private static void drawComponent(Graphics g, ControlProperties IVLProps) { Font font = new Font(IVLProps.FontName, IVLProps.FontSize); SolidBrush b = new SolidBrush(Color.FromName(IVLProps.ForeColor)); Rectangle rect = new Rectangle(IVLProps.X, IVLProps.Y, IVLProps.Width, IVLProps.Height); switch (IVLProps.Type) { case "System.Windows.Forms.Label": g.DrawString(IVLProps.Text, font, b, rect, StringFormat.GenericDefault); break; case "System.Windows.Forms.Textbox": g.DrawString(IVLProps.Text, font, b, rect, StringFormat.GenericDefault); break; case "System.Windows.Forms.PictureBox": Bitmap im = new Bitmap(IVLProps.ImageName); g.DrawImage(im, new Rectangle(IVLProps.X, IVLProps.Y, IVLProps.Width, IVLProps.Height)); break; case "IVLReport.IVL_ImageTable": g.DrawRectangle(Pens.Black, new Rectangle(IVLProps.X, IVLProps.Y, IVLProps.Width, IVLProps.Height)); //g.CopyFromScreen(new Point(IVLProps.X, IVLProps.Y), new Point(IVLProps.X, IVLProps.Y),new Size(IVLProps.Width,IVLProps.Height)); break; } }
internal void ReplaceObject(System.Object obj) { if (obj == null) { _Fields.Clear(); Controls.Clear(); } else if (_PreObject != obj) { _PreObject = base.Object = obj; Controls.Clear(); PropertyInfo[] infos = Object.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance); Type epaType = typeof(ExposePropertyAttribute); foreach (PropertyInfo info in infos) { if (!(info.CanRead && info.CanWrite)) { continue; } object[] attributes = info.GetCustomAttributes(true); ExposePropertyAttribute exposePropertyAttribute = null; foreach (object o in attributes) { if (o.GetType() == epaType) { exposePropertyAttribute = (ExposePropertyAttribute)o; break; } } if (exposePropertyAttribute == null) { continue; } PropertyType type; if (GetPropertyType(info.PropertyType, out type)) { ControlProperties control = CreateProperties(type, info, exposePropertyAttribute); if (control != null) { _Fields.Add(control); } } } if (_Fields.Count > 0) { _Fields.Sort(new ControlPropertiesComparer()); foreach (var item in _Fields) { item.Control.UserData = item; Controls.Add(item.Control); } } CreateCustomFileds(); } }
public CWizardDialog() : base() { this.Size = new Size(this.Width, 512); this.DoubleBuffered = true; bCancel.Location = bOk.Location; bOk.Location = new Point( this.Width - ControlProperties.ButtonWidth - ControlProperties.ControlSpacing * 2, bCancel.Top ); _Panels = new ArrayList(); _bPrev = new Button(); _bPrev.Location = new Point(ControlProperties.ControlSpacing * 2, bOk.Top); _bPrev.Size = ControlProperties.ButtonSize(); _bPrev.Anchor = (AnchorStyles)(AnchorStyles.Left | AnchorStyles.Bottom); _bNext = new Button(); _bNext.Location = bOk.Location; _bNext.Size = ControlProperties.ButtonSize(); _bNext.Anchor = (AnchorStyles)(AnchorStyles.Right | AnchorStyles.Bottom); this.Controls.Add(_bPrev); this.Controls.Add(_bNext); _bPrev.Click += new EventHandler(EH_Prev); _bNext.Click += new EventHandler(EH_Next); ShowDescription = false; }
internal static object GetControlProperty(string tag, ControlProperties property) { if (tag == "Hide") { tag = Properties.Settings.Default.Ribbon_ShowDownsizerTab ? "HideTab" : "RevealTab"; } var controlProperty = ControlDictionary[tag]; switch (property) { case ControlProperties.Label: return(controlProperty.Label); case ControlProperties.Description: return(controlProperty.Description); case ControlProperties.Image: return(controlProperty.Image); case ControlProperties.Screentip: return(controlProperty.Screentip); case ControlProperties.Supertip: return(controlProperty.Supertip); default: return(""); } }
private void write2Xml(string xmlFile) { TextWriter xmlWriter = new StreamWriter(xmlFile); XmlSerializer xmlSer = new XmlSerializer(typeof(ControlProperties)); foreach (Control item in reportCanvas_pnl.Controls) { IVLProps = getControlProp(item); xmlSer.Serialize(xmlWriter, IVLProps); xmlWriter.Flush(); } xmlWriter.Close(); StreamReader xmlRead = new StreamReader(xmlFile); string str = xmlRead.ReadToEnd(); xmlRead.Close(); Regex r = new Regex("\\<\\?(.*?)>", RegexOptions.Multiline); string x = r.Replace(str, ""); Regex r1 = new Regex("xmlns(.*?)XMLSchema\"", RegexOptions.Multiline); string y = r1.Replace(x, ""); y = "<Layout>" + y + "</Layout>"; string oriantationStr = "<Orientation>" + LayoutDetails.Current.Orientation + "</Orientation>"; string imgCnt = "<NoOfImg>" + LayoutDetails.Current.ReportImgCnt + "</NoOfImg>"; y = "<ReportTemplate>" + oriantationStr + imgCnt + y + "</ReportTemplate>"; StreamWriter finalWriter = new StreamWriter(xmlFile); finalWriter.Write(y); finalWriter.Close(); }
private void SetContents() { // already set the contents? ControlHeader.SetContents(this.thePackage, this.theDefs, this.theDefaultLang, this.theSubmodel); ControlProperties.SetContents(this.thePackage, this.theDefs, this.theDefaultLang, this.theSubmodel); ControlFooter.SetContents(this.thePackage, this.theDefs, this.theDefaultLang, this.theSubmodel); }
private ControlProperties getControlProp(Control c) { IVLProps = new ControlProperties(); IVLProps.Name = c.Name; IVLProps.BindingType = c.Tag.ToString(); IVLProps.X = c.Location.X; IVLProps.Y = c.Location.Y; IVLProps.Width = c.Width; IVLProps.Height = c.Height; IVLProps.Text = c.Text; if (c.Name.Contains("TableLayout")) { IVL_TabelLayout tableLayout = c as IVL_TabelLayout; //tableLayout = c as IVL_TabelLayout; IVLProps.Columns = tableLayout.ColumnCount; IVLProps.Rows = tableLayout.RowCount; } IVLProps.ForeColor = c.ForeColor.Name; IVLProps.FontName = c.Font.FontFamily.Name; IVLProps.FontStyle = c.Font.Style.ToString(); IVLProps.FontSize = (int)c.Font.Size; IVLProps.ImageName = c.AccessibleDescription; IVLProps.Type = c.GetType().ToString(); return(IVLProps); }
private void populateControls(ControlProperties IVLProps) { LangResourceCultureInfo = CultureInfo.CreateSpecificCulture(culturalInfo); if (IVLProps.Name.Contains("Bitmap")) { addLogo(IVLProps); } else if (IVLProps.Name.Contains("TextBox")) { addTextBox(IVLProps); } else if (IVLProps.Name.Contains("Label")) { addLabel(IVLProps); } else if (IVLProps.Name.Contains("ImgBox")) { addImgBox(IVLProps); } else if (IVLProps.Name.Contains("TableLayout")) { addTabelLayout(IVLProps); } propList.Add(IVLProps); }
public void OnCustomMenuItemClick(string menuItem, ControlProperties controlProperties, UpdateHistory updateBack) { if (updateBack != null) { updateBack(string.Format(menuItem, " handle " + ":" + controlProperties.ClassName + ":" + controlProperties.Caption)); } }
public void Initialize(IDataConnectionProperties connectionProperties) { if (connectionProperties == null) { throw new ArgumentNullException("connectionProperties"); } if (!(connectionProperties is SqlConnectionProperties) && !(connectionProperties is OleDBSqlConnectionProperties)) { throw new ArgumentException(Strings.SqlConnectionUIControl_InvalidConnectionProperties); } if (connectionProperties is OleDBSqlConnectionProperties) { currentOleDBProvider = connectionProperties["Provider"] as string; } if (connectionProperties is OdbcConnectionProperties) { // ODBC does not support saving the password savePasswordCheckBox.Enabled = false; } _controlProperties = new ControlProperties(connectionProperties); }
private void initIVLProps(String type) { IVLProps = new ControlProperties(); IVLProps.Name = type + propList.Count.ToString(); IVLProps.X = LayoutDetails.LeftMargin; IVLProps.Y = LayoutDetails.TopMargin; IVLProps.Text = IVLProps.Name; // xp.BackgroundColor = "White"; IVLProps.FontSize = 10; switch (type) { case "ImgBox": IVLProps.X = LayoutDetails.LeftMargin; IVLProps.Y = LayoutDetails.TopMargin + 100; bool isPortrait = LayoutDetails.Current.Orientation == LayoutDetails.PageOrientation.PORTRAIT; if (isPortrait) { IVLProps.Width = 480; IVLProps.Height = 360; } else { IVLProps.Width = 800; IVLProps.Height = 600; } break; case "TextBox": IVLProps.Width = 100; IVLProps.Height = 30; IVLProps.ForeColor = Color.Black.Name; break; case "Label": IVLProps.Width = 100; IVLProps.Height = 30; IVLProps.ForeColor = Color.Black.Name; break; case "Bitmap": IVLProps.Width = 100; IVLProps.Height = 75; OpenFileDialog ofd = new OpenFileDialog(); ofd.Filter = "JPG (*.jpg,*.jpeg)|*.jpg;*.jpeg|PNG (*.png,*.png)|*.png;*.png|TIFF (*.tif,*.tiff)|*.tif;*.tiff|BMP (*.bmp)|PNG (*.png)"; if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK) { IVLProps.ImageName = ofd.FileName; } break; case "TableLayout": IVLProps.Width = 200; IVLProps.Height = 130; IVLProps.ForeColor = Color.Black.Name; break; } propList.Add(IVLProps); }
public static ControlProperties GetProperties(AutomationElement ae) { ControlProperties aprop = new ControlProperties(); aprop.Name = ae.Current.Name; aprop.Handle = ae.Current.NativeWindowHandle; aprop.Caption = ae.Current.Name; return(aprop); }
private void setControlProp(Control c, ControlProperties IVLProps) { //if(!string.IsNullOrEmpty(IVLProps.Text)) c.Text = IVLProps.Text; c.Location = new Point((int)xlocation_nud.Value, (int)yLocation_nud.Value); c.Size = new System.Drawing.Size((int)width_nud.Value, (int)height_nud.Value); c.Font = new Font(IVLProps.FontName, IVLProps.FontSize, font_style); c.ForeColor = Color.FromName(IVLProps.ForeColor); c.Tag = IVLProps.BindingType; font_style = FontStyle.Regular; }
private void PopulateBody(object sender, RoutedEventArgs e) { var factory = new ElementFactory(); var properties = new ControlProperties() { Name = "mainTabControl" }; mainTabControl = factory.TabControlFactory(properties); BodyRoot.Children.Add(mainTabControl); PopulateMainTabControl(); }
void textBox_MouseCaptureChanged(object sender, EventArgs e) { if (isReportLoading) { return; } textBox = sender as IVL_TextBox; selectedControl = textBox; IVLProps = getControlProp(textBox); textBox.BringToFront(); showControlProperties(); drawSelectionRect(); }
private void addLogo(ControlProperties IVLProps) { logo = new IVL_Bitmap(); logo.AccessibleDescription = IVLProps.ImageName;//Place for ImageLocation logo.Name = IVLProps.Name; logo.Tag = IVLProps.BindingType; logo.Location = new Point(IVLProps.X, IVLProps.Y); logo.Size = new Size(IVLProps.Width, IVLProps.Height); logo.ImageLocation = IVLProps.ImageName; this.reportCanvas_pnl.Controls.Add(logo); logo.MouseCaptureChanged += logo_MouseCaptureChanged; logo_MouseCaptureChanged(logo, null); }
void label_MouseCaptureChanged(object sender, EventArgs e) { if (isReportLoading) { return; } label = sender as IVL_Label; selectedControl = label; IVLProps = getControlProp(label); label.BringToFront(); showControlProperties(); drawSelectionRect(); }
private void PopulateMainTabControl() { var config = new TotoConfig("default"); var factory = new ElementFactory(); List <string> mainMenuItems = config.GetMainMenuItems(); foreach (string menuItem in mainMenuItems) { var properties = new ControlProperties { Header = menuItem }; System.Windows.Controls.TabItem tabItem = factory.TabItemFactory(properties); mainTabControl.Items.Add(tabItem); } }
private void addImgBox(ControlProperties IVLProps) { bool isPortrait = LayoutDetails.Current.Orientation == LayoutDetails.PageOrientation.PORTRAIT; IVLTemplateCreator.IVLControls.IVL_ImageTable imgTable = new IVLTemplateCreator.IVLControls.IVL_ImageTable(imgFiles, isPortrait); imgTable.Tag = IVLProps.BindingType; imgTable.Name = IVLProps.Name; imgTable.Location = new Point(IVLProps.X, IVLProps.Y); imgTable.Size = new Size(IVLProps.Width, IVLProps.Height); imgTable.AccessibleDescription = IVLProps.ImageName;//Place for ImageLocation this.reportCanvas_pnl.Controls.Add(imgTable); imgTable.MouseCaptureChanged += imgTable_MouseCaptureChanged; imgTable_MouseCaptureChanged(imgTable, null); }
private void noOfImg_cbx_SelectedIndexChanged(object sender, EventArgs e) { LayoutDetails.Current.ReportImgCnt = int.Parse(noOfImg_cbx.SelectedItem.ToString()); imgFiles = new string[LayoutDetails.Current.ReportImgCnt]; for (int i = 0; i < LayoutDetails.Current.ReportImgCnt; i++) { imgFiles[i] = "test.jpg"; } IVLProps = getControlProp(imgTable); reportCanvas_pnl.Controls.Remove(imgTable); //initIVLProps("ImgBox"); addImgBox(IVLProps); }
// Constructors: public CPagedToolStrip() : base() { _PagesH = DEF_PAGESHEIGHT; _ToolPages = new ArrayList(); _PColor = ControlProperties.ColorItemInBack(); _Selected = -1; _Highlighted = -1; _IconSize = new Size(16, 16); _ToolBG = null; _ToolTip = new ToolTip(); _ToolTip.SetToolTip(this, "toolTip"); ResizeRedraw = true; DoubleBuffered = true; }
private void parseXmlData(string xmlFile) { if (!File.Exists(xmlFile)) { return; } this.Cursor = Cursors.WaitCursor; XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(xmlFile); string ori = xmlDoc.FirstChild.ChildNodes[0].InnerText; string imgCnt = xmlDoc.FirstChild.ChildNodes[1].InnerText; LayoutDetails.Current.ReportImgCnt = int.Parse(imgCnt); imgFiles = new string[LayoutDetails.Current.ReportImgCnt]; for (int i = 0; i < LayoutDetails.Current.ReportImgCnt; i++) { imgFiles[i] = "test.jpg"; } if (ori == "LANDSCAPE") { LayoutDetails.Current.Orientation = LayoutDetails.PageOrientation.LANDSCAPE; } else { LayoutDetails.Current.Orientation = LayoutDetails.PageOrientation.PORTRAIT; } createReportLayout(); isReportLoading = true; XmlNode controlNodes = xmlDoc.FirstChild.ChildNodes[2]; XmlSerializer xmlSer = new XmlSerializer(typeof(ControlProperties)); foreach (XmlNode item in controlNodes.ChildNodes) { MemoryStream memStearm = new MemoryStream(); StreamWriter writer = new StreamWriter(memStearm); writer.Write(item.OuterXml); writer.Flush(); memStearm.Position = 0; IVLProps = (ControlProperties)xmlSer.Deserialize(memStearm); populateControls(IVLProps); } isReportLoading = false; this.Cursor = Cursors.Default; this.reportCanvas_pnl.Refresh(); }
private void addTextBox(ControlProperties IVLProps) { textBox = new IVL_TextBox(); textBox.Name = IVLProps.Name; textBox.Tag = IVLProps.BindingType; textBox.Size = new Size(IVLProps.Width, IVLProps.Height); textBox.Location = new Point(IVLProps.X, IVLProps.Y); textBox.Text = IVLProps.Text; textBox.Font = new Font(IVLProps.FontName, IVLProps.FontSize); textBox.ForeColor = Color.FromName(IVLProps.ForeColor); textBox.BorderStyle = BorderStyle.Fixed3D; textBox.Margin = new Padding(0); this.reportCanvas_pnl.Controls.Add(textBox); textBox.MouseCaptureChanged += textBox_MouseCaptureChanged; textBox_MouseCaptureChanged(textBox, null); }
public void Initialize(IDataConnectionProperties connectionProperties) { if (connectionProperties == null) { throw new ArgumentNullException("connectionProperties"); } if (!(connectionProperties is SqlConnectionProperties) && !(connectionProperties is OleDBSqlConnectionProperties)) { throw new ArgumentException("invalid"); } if (connectionProperties is OleDBSqlConnectionProperties) { currentOleDBProvider = connectionProperties["Provider"] as string; } _controlProperties = new ControlProperties(connectionProperties); }
private void addTabelLayout(ControlProperties IVLProps) { bool isPortrait = LayoutDetails.Current.Orientation == LayoutDetails.PageOrientation.PORTRAIT; tabLayout = new IVL_TabelLayout(); propertyGrid1.SelectedObject = tabLayout; tabLayout.Tag = IVLProps.BindingType; tabLayout.Name = IVLProps.Name; tabLayout.Location = new Point(IVLProps.X, IVLProps.Y); tabLayout.Size = new Size(IVLProps.Width, IVLProps.Height); tabLayout.rowPercent = (int)rowStylepercent_nud.Value; tabLayout.colPercent = (int)colStylePercent_nud.Value; //tabLayout.rows = (int)rowCount_nud.Value; //tabLayout.cols = (int)colCount_nud.Value; tabLayout.RowCount = IVLProps.Rows; tabLayout.ColumnCount = IVLProps.Columns; this.reportCanvas_pnl.Controls.Add(tabLayout); tabLayout.MouseCaptureChanged += tabLayout_MouseCaptureChanged; tabLayout_MouseCaptureChanged(tabLayout, null); }
public void SelecionarOpcao(string name) { IEnumerable <AlternateContent> alternateContents = _controlesFolhaAtual.Elements <AlternateContent>(); Control control = (from ac in alternateContents from acc in ac.GetFirstChild <AlternateContentChoice>() from c in acc.GetFirstChild <Control>() from p in c.GetFirstChild <ControlProperties>() where (c as Control).Name == name select(c as Control)).SingleOrDefault(); //AlternateContent alternateContent = _controlesFolhaAtual.Elements<AlternateContent>().ElementAt(index); //AlternateContentChoice alternateContentChoice = alternateContent.GetFirstChild<AlternateContentChoice>(); //Control control = alternateContentChoice.GetFirstChild<Control>(); ControlProperties controlProperties = control.GetFirstChild <ControlProperties>(); PreencherCampo(controlProperties.LinkedCell, true); }
public void Initialize(IDataConnectionProperties connectionProperties) { if (connectionProperties == null) { throw new ArgumentNullException("connectionProperties"); } if (!(connectionProperties is SqlConnectionProperties) && !(connectionProperties is OleDBSqlConnectionProperties)) { throw new ArgumentException(Strings.SqlConnectionUIControl_InvalidConnectionProperties); } if (connectionProperties is OleDBSqlConnectionProperties) { currentOleDBProvider = connectionProperties["Provider"] as string; } if (connectionProperties is OdbcConnectionProperties) { // ODBC does not support saving the password savePasswordCheckBox.Enabled = false; } _controlProperties = new ControlProperties(connectionProperties); /* * Karen Payne comment: * I added the ContextMenu contextMenuStrip1 with one * item that is my SQL-Server name. If I'm login then * Karens is the user name which then attaches the context * menu to the ComoboBox for server that when right clicked * I can select my Server name. This is good for me testing * things out rather than having to type in my server name. */ if (Environment.UserName == "Karens") { serverComboBox.ContextMenuStrip = contextMenuStrip1; } serverComboBox.ContextMenuStrip = contextMenuStrip1; }
private void Refresh() { ControlProperties.RemoveAllChildren(); if (SelectedControl == null) { return; } var props = GuiDumpCommand.PropertyValuesFor(SelectedControl); foreach (var(prop, value) in props) { ControlProperties.AddChild(new Label { Text = prop }); ControlProperties.AddChild(new Label { Text = value }); } }
private void ProcessControl(object extendee, ControlProperties extendedProperties) { if (! extendedProperties.ActionTaken && extendedProperties.ValidRoleAction != ValidRoleAction.None && (extendedProperties.ValidRoles != null)) { PropertyInfo controlProperty = extendee.GetType().GetProperty(extendedProperties.ValidRoleAction.ToString()); if ((m_user != null)&& (controlProperty != null)) { // User has been logged in and the control property exists. controlProperty.SetValue(extendee, false, null); // By default we'll set the property to False. foreach (string role in extendedProperties.ValidRoles.Replace(" ", "").Replace(",", ";").Split(';')) { if (m_user.FindRole(role, m_applicationName) != null) { // We'll set the property to True if the current user belongs either one of the valid roles. controlProperty.SetValue(extendee, true, null); break; } } } } }
private ControlProperties GetProperties(object extendee) { ControlProperties properties = (ControlProperties) (m_extendeeControls[extendee]); if (properties == null) { properties = new ControlProperties(); m_extendeeControls.Add(extendee, properties); } return properties; }
internal ControlPropertiesAppearance(ControlProperties parent) { }
protected virtual void initToolStrip() { this.SuspendLayout(); _ctlToolStrip = new CPagedToolStrip(); _ctlToolStrip.IconSize = new Size(32, 32); _ctlToolStrip.Font = new System.Drawing.Font("Arial", _FontSize, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); _ctlToolStrip.Name = "ToolStrip"; _ctlToolStrip.Anchor = (AnchorStyles)(AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top); _ctlToolStrip.Location = new Point(0, _ctlPageSelector.Bottom); //_ctlToolStrip.Location = new Point(0, 0); _ctlToolStrip.Size = new Size(_ctlPageSelector.Width, _ctlPagesHost.Top - _ctlPageSelector.Bottom); _ctlToolStrip.StripBackground = (Image)(RsViewEngine.SpecialResources.GetObject("ToolBG")); _ctlToolStrip.Dock = DockStyle.Top; // Create objects: _setCollection = new StripToolPageset(_ctlToolStrip); _setCollection.Add(_pHome = new StripToolPage(_ctlToolStrip, "home")); _setCollection.Add(_pEdit = new StripToolPage(_ctlToolStrip, "edit")); _setSettings = new StripToolPageset(_ctlToolStrip); _setSettings.Add(_pHome); _setReport = new StripToolPageset(_ctlToolStrip); _setReport.Add(_pView = new StripToolPage(_ctlToolStrip, "view")); _setReport.Add(_pExport = new StripToolPage(_ctlToolStrip, "export")); _gFile = new StripToolGroup(_ctlToolStrip); _gSpec = new StripToolGroup(_ctlToolStrip); _gCollAdd = new StripToolGroup(_ctlToolStrip); _gCollEdit = new StripToolGroup(_ctlToolStrip); _gCollRemove = new StripToolGroup(_ctlToolStrip); _gPrint = new StripToolGroup(_ctlToolStrip); _gToFile = new StripToolGroup(_ctlToolStrip); _gRefresh = new StripToolGroup(_ctlToolStrip); _gPanels = new StripToolGroup(_ctlToolStrip); _gZoom = new StripToolGroup(_ctlToolStrip); _gPages = new StripToolGroup(_ctlToolStrip); _gFile.GroupColor = ControlProperties.ColorItemInBack(); _gSpec.GroupColor = ControlProperties.ColorItemInBack(); _gCollAdd.GroupColor = ControlProperties.ColorItemInBack(); _gCollEdit.GroupColor = ControlProperties.ColorItemInBack(); _gCollRemove.GroupColor = ControlProperties.ColorItemInBack(); _gPrint.GroupColor = ControlProperties.ColorItemInBack(); _gToFile.GroupColor = ControlProperties.ColorItemInBack(); _gRefresh.GroupColor = ControlProperties.ColorItemInBack(); _gPanels.GroupColor = ControlProperties.ColorItemInBack(); _gZoom.GroupColor = ControlProperties.ColorItemInBack(); _gPages.GroupColor = ControlProperties.ColorItemInBack(); // Create icons: _iOpenRpt = _gFile.Add(new StripToolItem(_ctlToolStrip, (Image)(RsViewEngine.Resources.GetObject("icon_open_32x32")))); _iImportCollection = _gFile.Add(new StripToolItem(_ctlToolStrip, (Image)(RsViewEngine.Resources.GetObject("icon_importCollection_32x32")))); _iExportCollection = _gFile.Add(new StripToolItem(_ctlToolStrip, (Image)(RsViewEngine.Resources.GetObject("icon_exportCollection_32x32")))); _iSettings = _gSpec.Add(new StripToolItem(_ctlToolStrip, (Image)(RsViewEngine.Resources.GetObject("icon_settings_32x32")))); _iHelp = _gSpec.Add(new StripToolItem(_ctlToolStrip, (Image)(RsViewEngine.Resources.GetObject("icon_help_32x32")))); _iAddColl = _gCollAdd.Add(new StripToolItem(_ctlToolStrip, (Image)(RsViewEngine.Resources.GetObject("icon_addColl_32x32")))); _iNewFolder = _gCollAdd.Add(new StripToolItem(_ctlToolStrip, (Image)(RsViewEngine.Resources.GetObject("icon_newFolder_32x32")))); _iAddRpt = _gCollAdd.Add(new StripToolItem(_ctlToolStrip, (Image)(RsViewEngine.Resources.GetObject("icon_add_32x32")))); _iEditRpt = _gCollEdit.Add(new StripToolItem(_ctlToolStrip, (Image)(RsViewEngine.Resources.GetObject("icon_editItem_32x32")))); _iRemove = _gCollRemove.Add(new StripToolItem(_ctlToolStrip, (Image)(RsViewEngine.Resources.GetObject("icon_remove_32x32")))); _iPrint = _gPrint.Add(new StripToolItem(_ctlToolStrip, (Image)(RsViewEngine.Resources.GetObject("icon_print_32x32")))); _iMail = _gPrint.Add(new StripToolItem(_ctlToolStrip, (Image)(RsViewEngine.Resources.GetObject("icon_mail_32x32")))); _iPDF = _gToFile.Add(new StripToolItem(_ctlToolStrip, (Image)(RsViewEngine.Resources.GetObject("icon_pdf_32x32")))); _iWord = _gToFile.Add(new StripToolItem(_ctlToolStrip, (Image)(RsViewEngine.Resources.GetObject("icon_word_32x32")))); _iXLS = _gToFile.Add(new StripToolItem(_ctlToolStrip, (Image)(RsViewEngine.Resources.GetObject("icon_excel_32x32")))); _iHTML = _gToFile.Add(new StripToolItem(_ctlToolStrip, (Image)(RsViewEngine.Resources.GetObject("icon_html_32x32")))); _iXML = _gToFile.Add(new StripToolItem(_ctlToolStrip, (Image)(RsViewEngine.Resources.GetObject("icon_xml_32x32")))); _iRefresh = _gRefresh.Add(new StripToolItem(_ctlToolStrip, (Image)(RsViewEngine.Resources.GetObject("icon_refresh_32x32")))); _iOffline = _gRefresh.Add(new StripToolItem(_ctlToolStrip, (Image)(RsViewEngine.Resources.GetObject("icon_offline_32x32")))); _iGroups = _gPanels.Add(new StripToolItem(_ctlToolStrip, (Image)(RsViewEngine.Resources.GetObject("icon_groups_32x32")))); _iZoomIn = _gZoom.Add(new StripToolItem(_ctlToolStrip, (Image)(RsViewEngine.Resources.GetObject("icon_zoomIn_32x32")))); _iZoomWidth = _gZoom.Add(new StripToolItem(_ctlToolStrip, (Image)(RsViewEngine.Resources.GetObject("icon_zoomFitWidth_32x32")))); _iZoomWnd = _gZoom.Add(new StripToolItem(_ctlToolStrip, (Image)(RsViewEngine.Resources.GetObject("icon_zoomFitWindow_32x32")))); _iZoomOut = _gZoom.Add(new StripToolItem(_ctlToolStrip, (Image)(RsViewEngine.Resources.GetObject("icon_zoomOut_32x32")))); _iFirst = _gPages.Add(new StripToolItem(_ctlToolStrip, (Image)(RsViewEngine.Resources.GetObject("icon_first_32x32")))); _iPrev = _gPages.Add(new StripToolItem(_ctlToolStrip, (Image)(RsViewEngine.Resources.GetObject("icon_previous_32x32")))); _iNext = _gPages.Add(new StripToolItem(_ctlToolStrip, (Image)(RsViewEngine.Resources.GetObject("icon_next_32x32")))); _iLast = _gPages.Add(new StripToolItem(_ctlToolStrip, (Image)(RsViewEngine.Resources.GetObject("icon_last_32x32")))); // Build structure: _pHome.Add(_gFile); _pHome.Add(_gSpec); _pEdit.Add(_gFile); _pEdit.Add(_gCollAdd); _pEdit.Add(_gCollEdit); _pEdit.Add(_gCollRemove); _pExport.Add(_gFile); _pExport.Add(_gRefresh); _pExport.Add(_gPrint); _pExport.Add(_gToFile); _pView.Add(_gFile); _pView.Add(_gRefresh); _pView.Add(_gPages); _pView.Add(_gZoom); _pView.Add(_gPanels); // Add event handlers: _iOpenRpt.Action += new ToolItemAction(EH_OpenAction); _iSettings.Action += new ToolItemAction(EH_SettingsClick); _iExportCollection.Action += new ToolItemAction(EH_ExportAction); _iImportCollection.Action += new ToolItemAction(EH_ImportAction); _iEditRpt.Action += new ToolItemAction(EH_EditAction); _iAddRpt.Action += new ToolItemAction(EH_AddRptAction); _iRemove.Action += new ToolItemAction(EH_RemoveAction); _iNewFolder.Action += new ToolItemAction(EH_AddFolderAction); _iAddColl.Action += new ToolItemAction(EH_AddCollectionAction); _iPrint.Action += new ToolItemAction(EH_PrintAction); _iPDF.Action += new ToolItemAction(EH_ExportPDFAction); _iMail.Action += new ToolItemAction(EH_Mail); _iWord.Action += new ToolItemAction(EH_ExportWordAction); _iXLS.Action += new ToolItemAction(EH_ExportExcelAction); _iXML.Action += new ToolItemAction(EH_ExportXMLAction); _iHTML.Action += new ToolItemAction(EH_ExportHTMLAction); _iHelp.Action += new ToolItemAction(EH_ShowAbout); _iRefresh.Action += new ToolItemAction(EH_RefreshReport); _iOffline.Action += new ToolItemAction(EH_Offline); _iGroups.Action += new ToolItemAction(EH_ShowGroups); _iZoomIn.Action += new ToolItemAction(EH_ZoomIn); _iZoomOut.Action += new ToolItemAction(EH_ZoomOut); _iZoomWnd.Action += new ToolItemAction(EH_ZoomFitwindow); _iZoomWidth.Action += new ToolItemAction(EH_ZoomFitwidth); _iFirst.Action += new ToolItemAction(EH_Paging); _iPrev.Action += new ToolItemAction(EH_Paging); _iNext.Action += new ToolItemAction(EH_Paging); _iLast.Action += new ToolItemAction(EH_Paging); // Other statements: _ctlToolStrip.PageSet = _setCollection; _ctlToolStrip.SelectedPage = _pEdit; _iGroups.Type = StripToolItemType.Button; _iZoomWnd.Type = StripToolItemType.Button; _iZoomWidth.Type = StripToolItemType.Button; _iXLS.Type = StripToolItemType.Multifunctional; _aExcelFormatted = _iXLS.AddAction(); _aExcelFormatted.Action += new ToolItemAction(EH_ExportExcelAction); _aExcelDataOnly = _iXLS.AddAction(); _aExcelDataOnly.Action += new ToolItemAction(EH_ExportExcelDataOnlyAction); this.Controls.Add(_ctlToolStrip); //this._ctlPagesHost.Location = new System.Drawing.Point(0, _ctlToolStrip.Bottom); this.ResumeLayout(false); }
internal ControlPropertiesView (ControlProperties parent) { }
public NetCommand(string control, ControlProperties property, object value) { ControlName = control; _controlProperty = property; ControlValue = value.ToString(); }
public void Initialize(IDataConnectionProperties connectionProperties) { if (connectionProperties == null) { throw new ArgumentNullException("connectionProperties"); } if (!(connectionProperties is SqlConnectionProperties) && !(connectionProperties is OleDBSqlConnectionProperties)) { throw new ArgumentException(Strings.SqlConnectionUIControl_InvalidConnectionProperties); } if (connectionProperties is OleDBSqlConnectionProperties) { currentOleDBProvider = connectionProperties["Provider"] as string; } if (connectionProperties is OdbcConnectionProperties) { // ODBC does not support saving the password savePasswordCheckBox.Enabled = false; } _controlProperties = new ControlProperties(connectionProperties); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.controlTreeView = new XmlMappingTaskPane.Controls.ControlTreeView(); this.controlPartList = new XmlMappingTaskPane.Controls.ControlPartList(); this.splitContainer = new System.Windows.Forms.SplitContainer(); this.controlProperties = new XmlMappingTaskPane.Controls.ControlProperties(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); this.splitContainer.Panel1.SuspendLayout(); this.splitContainer.Panel2.SuspendLayout(); this.splitContainer.SuspendLayout(); this.SuspendLayout(); // // controlTreeView // this.controlTreeView.Dock = System.Windows.Forms.DockStyle.Fill; this.controlTreeView.Location = new System.Drawing.Point(0, 0); this.controlTreeView.Name = "controlTreeView"; this.controlTreeView.Size = new System.Drawing.Size(242, 279); this.controlTreeView.TabIndex = 1; // // controlPartList // this.controlPartList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.controlPartList.Location = new System.Drawing.Point(0, 0); this.controlPartList.Name = "controlPartList"; this.controlPartList.Size = new System.Drawing.Size(248, 47); this.controlPartList.TabIndex = 0; // // splitContainer // this.splitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.splitContainer.Location = new System.Drawing.Point(3, 46); this.splitContainer.Name = "splitContainer"; this.splitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal; // // splitContainer.Panel1 // this.splitContainer.Panel1.Controls.Add(this.controlTreeView); // // splitContainer.Panel2 // this.splitContainer.Panel2.Controls.Add(this.controlProperties); this.splitContainer.Size = new System.Drawing.Size(242, 384); this.splitContainer.SplitterDistance = 279; this.splitContainer.TabIndex = 2; // // controlProperties // this.controlProperties.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.controlProperties.Location = new System.Drawing.Point(0, 2); this.controlProperties.Name = "controlProperties"; this.controlProperties.Size = new System.Drawing.Size(242, 99); this.controlProperties.TabIndex = 0; // // ControlMain // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.splitContainer); this.Controls.Add(this.controlPartList); this.Name = "ControlMain"; this.Size = new System.Drawing.Size(248, 433); this.Resize += new System.EventHandler(this.ControlMain_Resize); this.splitContainer.Panel1.ResumeLayout(false); this.splitContainer.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit(); this.splitContainer.ResumeLayout(false); this.ResumeLayout(false); }
internal static object GetProperty(string tag, ControlProperties property) { return(RibbonControlValues.GetControlProperty(tag, property)); }