Development #338
@@ -56,6 +56,9 @@ namespace Volian.Controls.Library
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		private ROFSTLookup.rochild selectedChld;
 | 
							private ROFSTLookup.rochild selectedChld;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							private DisplayTags displayTags;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		#endregion
 | 
							#endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		#region Properties
 | 
							#region Properties
 | 
				
			||||||
@@ -268,6 +271,10 @@ namespace Volian.Controls.Library
 | 
				
			|||||||
				_searchTimer.Stop();
 | 
									_searchTimer.Stop();
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								// Initialize the DisplayTags object
 | 
				
			||||||
 | 
								displayTags = new DisplayTags();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			_progressBar = null;
 | 
								_progressBar = null;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -927,7 +934,7 @@ namespace Volian.Controls.Library
 | 
				
			|||||||
			bool replacingRO = (_savCurROLink != null);
 | 
								bool replacingRO = (_savCurROLink != null);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			string insrpl = (replacingRO) ? "Cannot Replace" : "Cannot Insert";
 | 
								string insrpl = (replacingRO) ? "Cannot Replace" : "Cannot Insert";
 | 
				
			||||||
			string errormsg = string.Empty;
 | 
								string errormsg = string.Empty;	
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			switch (selectedRO.type)
 | 
								switch (selectedRO.type)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
@@ -968,7 +975,10 @@ namespace Volian.Controls.Library
 | 
				
			|||||||
						errormsg = (replacingRO) ? "a graphics RO with a non-graphcis RO." : "a Graphics RO in an non-Figure or a non-Accessory Page type.";
 | 
											errormsg = (replacingRO) ? "a graphics RO with a non-graphcis RO." : "a Graphics RO in an non-Figure or a non-Accessory Page type.";
 | 
				
			||||||
						//TODO: Prompt user to insert a new substep type that handles x/y Plots and place this RO into it
 | 
											//TODO: Prompt user to insert a new substep type that handles x/y Plots and place this RO into it
 | 
				
			||||||
						goodToGo = false;
 | 
											goodToGo = false;
 | 
				
			||||||
					}
 | 
					
 | 
				
			||||||
 | 
											
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
					break;
 | 
										break;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -383,6 +383,8 @@ namespace Volian.Controls.Library
 | 
				
			|||||||
				cmbCheckoff.Enabled = false;
 | 
									cmbCheckoff.Enabled = false;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			// show the part of panel for resizing a figure (if figure already exists: MyImage is set for non-RO existing images & content.text has a link in it)
 | 
								// show the part of panel for resizing a figure (if figure already exists: MyImage is set for non-RO existing images & content.text has a link in it)
 | 
				
			||||||
			if (MyEditItem.MyItemInfo.IsFigure && (MyEditItem.MyItemInfo.MyContent.MyImage != null || MyEditItem.MyItemInfo.MyContent.Text.ToUpper().Contains("#LINK")))
 | 
								if (MyEditItem.MyItemInfo.IsFigure && (MyEditItem.MyItemInfo.MyContent.MyImage != null || MyEditItem.MyItemInfo.MyContent.Text.ToUpper().Contains("#LINK")))
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
@@ -391,22 +393,36 @@ namespace Volian.Controls.Library
 | 
				
			|||||||
				int wd = (MyEditItem as ImageItem).MyPictureBox.Width;
 | 
									int wd = (MyEditItem as ImageItem).MyPictureBox.Width;
 | 
				
			||||||
				_origFigureSizeRatio = (float)ht / (float)wd;   // use this to keep width/height ratio while changing size.
 | 
									_origFigureSizeRatio = (float)ht / (float)wd;   // use this to keep width/height ratio while changing size.
 | 
				
			||||||
				float wd1 = (float)MyEditItem.MyItemInfo.MyDocStyle.Layout.PageWidth - (float)MyEditItem.MyItemInfo.MyDocStyle.Layout.LeftMargin;
 | 
									float wd1 = (float)MyEditItem.MyItemInfo.MyDocStyle.Layout.PageWidth - (float)MyEditItem.MyItemInfo.MyDocStyle.Layout.LeftMargin;
 | 
				
			||||||
				float ht1 = (float)MyEditItem.MyItemInfo.MyDocStyle.Layout.PageLength - (float)MyEditItem.MyItemInfo.MyDocStyle.Layout.TopMargin - 36;	// 36 is to allow for end message 
 | 
									float ht1 = (float)MyEditItem.MyItemInfo.MyDocStyle.Layout.PageLength - (float)MyEditItem.MyItemInfo.MyDocStyle.Layout.TopMargin - 36;  // 36 is to allow for end message 
 | 
				
			||||||
				float wd2 = Math.Min(wd1, ht1 / _origFigureSizeRatio);		// keep original ratio
 | 
									float wd2 = Math.Min(wd1, ht1 / _origFigureSizeRatio);      // keep original ratio
 | 
				
			||||||
				trBarFS.Maximum = Math.Max((int)wd2, trBarFS.Maximum);
 | 
					
 | 
				
			||||||
				if (wd > trBarFS.Maximum) trBarFS.Maximum = wd + 1;
 | 
									SetFigure(wd1, wd2); 
 | 
				
			||||||
				trBarFS.Minimum = Math.Min(wd, 72);
 | 
					
 | 
				
			||||||
				trBarFS.Value = (int)wd;
 | 
									//trBarFS.Maximum = Math.Max((int)wd2, trBarFS.Maximum);
 | 
				
			||||||
				ImageItem ii = MyEditItem as ImageItem;
 | 
									//if (wd > trBarFS.Maximum) trBarFS.Maximum = wd + 1;
 | 
				
			||||||
				_origFigureSizeWidth = ii.MyPictureBox.Width;
 | 
									//trBarFS.Minimum = Math.Min(wd, 72);
 | 
				
			||||||
				tbFSWd.Text = ii.MyPictureBox.Width.ToString();
 | 
									//trBarFS.Value = (int)wd;
 | 
				
			||||||
				tbFSHt.Text = ii.MyPictureBox.Height.ToString();
 | 
									//ImageItem ii = MyEditItem as ImageItem;
 | 
				
			||||||
 | 
									//_origFigureSizeWidth = ii.MyPictureBox.Width;
 | 
				
			||||||
 | 
									//tbFSWd.Text = ii.MyPictureBox.Width.ToString();
 | 
				
			||||||
 | 
									//tbFSHt.Text = ii.MyPictureBox.Height.ToString();
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			else
 | 
								else
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				if (MyEditItem.MyItemInfo.IsFigure)
 | 
									if (MyEditItem.MyItemInfo.IsFigure)
 | 
				
			||||||
					//No Current image, but still show groupPanelFigSize, will adjust when file is selected.
 | 
									{
 | 
				
			||||||
 | 
										//No Current image, but still show groupPanelFigSize, will adjust when file is selected, but let's give it a default
 | 
				
			||||||
 | 
										//size on using the picturebox.
 | 
				
			||||||
					groupPanelFigSize.Visible = true;
 | 
										groupPanelFigSize.Visible = true;
 | 
				
			||||||
 | 
										int ht = (MyEditItem as ImageItem).MyPictureBox.Height;
 | 
				
			||||||
 | 
										int wd = (MyEditItem as ImageItem).MyPictureBox.Width;
 | 
				
			||||||
 | 
										_origFigureSizeRatio = (float)ht / (float)wd;   // use this to keep width/height ratio while changing size.
 | 
				
			||||||
 | 
										float wd1 = (float)MyEditItem.MyItemInfo.MyDocStyle.Layout.PageWidth - (float)MyEditItem.MyItemInfo.MyDocStyle.Layout.LeftMargin;
 | 
				
			||||||
 | 
										float ht1 = (float)MyEditItem.MyItemInfo.MyDocStyle.Layout.PageLength - (float)MyEditItem.MyItemInfo.MyDocStyle.Layout.TopMargin - 36;  // 36 is to allow for end message 
 | 
				
			||||||
 | 
										float wd2 = Math.Min(wd1, ht1 / _origFigureSizeRatio);      // keep original ratio
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
										SetFigure(wd1, wd2);
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
				else
 | 
									else
 | 
				
			||||||
					groupPanelFigSize.Visible = false;
 | 
										groupPanelFigSize.Visible = false;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
@@ -520,6 +536,22 @@ namespace Volian.Controls.Library
 | 
				
			|||||||
			}
 | 
								}
 | 
				
			||||||
			_Initalizing = false;
 | 
								_Initalizing = false;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
							public void SetFigure(double wd, double wd2)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								// Check MyEditItem type and cast if needed
 | 
				
			||||||
 | 
								ImageItem ii = MyEditItem as ImageItem;
 | 
				
			||||||
 | 
								if (ii == null) return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								// Set the values as needed
 | 
				
			||||||
 | 
								trBarFS.Maximum = Math.Max((int)wd2, trBarFS.Maximum);
 | 
				
			||||||
 | 
								if (wd > trBarFS.Maximum) trBarFS.Maximum = (int)wd + 1;
 | 
				
			||||||
 | 
								trBarFS.Minimum = Math.Min((int)wd, 72);
 | 
				
			||||||
 | 
								trBarFS.Value = (int)wd;
 | 
				
			||||||
 | 
								_origFigureSizeWidth = ii.MyPictureBox.Width;
 | 
				
			||||||
 | 
								tbFSWd.Text = ii.MyPictureBox.Width.ToString();
 | 
				
			||||||
 | 
								tbFSHt.Text = ii.MyPictureBox.Height.ToString();
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		private int DoListStepTypes(FormatData fmtdata, StepData topType, string curType)
 | 
							private int DoListStepTypes(FormatData fmtdata, StepData topType, string curType)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			int cursel=-1;
 | 
								int cursel=-1;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user