private void InitThemes() { // Register custom theme var customThemePath = Path.Combine(Directory.GetCurrentDirectory(), _customThemeName + ".c1themez"); if (File.Exists(customThemePath)) { C1ThemeController.RegisterTheme(customThemePath); } // Load themes into ribbon combo box var themes = C1ThemeController.GetThemes().Where(x => x == _customThemeName || x.Contains("Office2016") || x.Contains("Material")); foreach (var theme in themes) { _lstThemes.Items.Add(theme); } // Set default theme var customThemeIndex = _lstThemes.Items.IndexOf(_customThemeName); if (customThemeIndex > -1) { _lstThemes.SelectedIndex = customThemeIndex; } }
void SetupThemes() { foreach (var theme in C1ThemeController.GetThemes().Where(x => x.Contains("Office2016")).ToList()) { listBox1.Items.Add(theme); } }
private void InitThemes() { // register custom theme string customThemePath = Path.Combine(Directory.GetCurrentDirectory(), CustomThemeName + ".c1themez"); if (File.Exists(customThemePath) && !C1ThemeController.IsThemeRegistered(CustomThemeName)) { C1ThemeController.RegisterTheme(customThemePath); } // load themes into ribbon combo box foreach (string theme in C1ThemeController.GetThemes()) { if (!(theme == CustomThemeName || theme.Contains("Office2016") || theme.Contains("Material"))) { continue; } _ribbonComboBoxThemes.Items.Add(theme); } // set default theme int customThemeIndex = _ribbonComboBoxThemes.Items.IndexOf(CustomThemeName); if (customThemeIndex > -1) { _ribbonComboBoxThemes.SelectedIndex = customThemeIndex; } }
public Form1() { InitializeComponent(); foreach (SampleItem sample in SampleDataSource.AllItems) { lblSamples.Items.Add(sample); } lblSamples.SelectedIndex = 0; var item = new C1.Win.Input.ComboBoxItem(); item.DisplayText = "(none)"; cmbThemes.Items.Add(item); var themes = C1ThemeController.GetThemes(); foreach (var theme in themes) { var themeItem = new C1.Win.Input.ComboBoxItem(); themeItem.DisplayText = theme; cmbThemes.Items.Add(themeItem); } cmbThemes.SelectedIndex = 0; }
public Form1() { // designer support InitializeComponent(); // fill c1 predefined themes foreach (string theme in C1ThemeController.GetThemes()) { cbTheme.Items.Add(theme); } cbTheme.SelectedIndexChanged += cbTheme_SelectedIndexChanged; // connect to sample data var da = new OleDbDataAdapter(Properties.Resources.sql, GetConnectionString()); var dt = new DataTable("NorthWind Sales Data"); da.Fill(dt); // assign data to C1FlexPivotPage control _c1FlexPivotPage.DataSource = dt; // set default view var fp = _c1FlexPivotPage.FlexPivotEngine; fp.ValueFields.MaxItems = 3; fp.BeginUpdate(); fp.RowFields.Add("Country"); fp.ColumnFields.Add("Product"); fp.ValueFields.Add("Sales"); fp.EndUpdate(); }
private void initConfig() { pageLoad = true; tque = new TQueue(); queCaller = new BQueueCaller(); theme1 = new C1ThemeController(); fEdit = new Font(bqc.iniC.grdViewFontName, bqc.grdViewFontSize, FontStyle.Regular); foreach (String aaa in C1ThemeController.GetThemes()) { rbTheme.Items.Add(aaa); } //rbTheme.SelectedItem.Description = "Office2016Colorful"; //bqc.bquDB.queDateDB.setCboQueDate(cboStf, bqc.iniC.queuefixid, System.DateTime.Now.Year + "-" + System.DateTime.Now.ToString("MM-dd")); bqc.bquDB.queDateDB.setCboQueDate1(cboQueDate, bqc.iniC.queuefixid, System.DateTime.Now.Year + "-" + System.DateTime.Now.ToString("MM-dd")); //new LogWriter("d", "FrmQueueNext initConfig "); setControl(); //cboStf.SelectedValueChanged += CboStf_SelectedValueChanged; cboQueDate.SelectedIndexChanged += CboQueDate_SelectedIndexChanged; btnQueNext.Click += BtnQueNext_Click; chkQueSend.Click += ChkQueSend_Click; btnQueSend.Click += BtnQueSend_Click; chkQueVoid.Click += ChkQueVoid_Click; btnQueVoid.Click += BtnQueVoid_Click; btnCaller.Click += BtnCaller_Click; rbTheme.Text = "VS2013Red"; rbTheme.SelectedIndexChanged += RbTheme_SelectedIndexChanged; setTheme1(rbTheme.Text); pageLoad = false; }
private void Initialize() { foreach (var theme in C1ThemeController.GetThemes()) { ribbonCmbThemes.Items.Add(theme); } }
private void InitThemes() { var themes = C1ThemeController.GetThemes().Where(x => x.Contains("Office2016")); foreach (var theme in themes) { ribbonComboBoxTheme.Items.Add(theme); } }
private void InitThemes() { var themes = C1ThemeController.GetThemes().Where(x => x.Contains("Office2016")); foreach (var theme in themes) { cmbTheme.Items.Add(theme); } cmbTheme.SelectedIndex = 3; }
private void FillComboBoxWithThemeNames() { var themes = C1ThemeController.GetThemes(); foreach (var theme in themes) { ribbonCmbThemes.Items.Add(theme); } ribbonCmbThemes.SelectedIndex = Array.IndexOf(themes, "Office2016Colorful"); }
private void InitializeRibbonStyleMenu() { ribbonStyleCombo.Items.Clear(); string[] themes = C1ThemeController.GetThemes(); ribbonStyleCombo.Items.Add("(No Theme)"); foreach (string theme in themes) { ribbonStyleCombo.Items.Add(theme); } ribbonStyleCombo.SelectedIndex = 0; }
private void Initialize() { c1Ribbon1.SelectedTabIndex = 1; foreach (var theme in C1ThemeController.GetThemes()) { ribbonCmbThemes.Items.Add(theme); } // init TreeView c1TreeView1.Columns.Clear(); c1TreeView1.DataSource = null; c1TreeView1.DataMember = "\\ProductsGroups\\Products"; var column = new C1TreeColumn { HeaderText = "Name" }; c1TreeView1.Columns.Add(column); column = new C1TreeColumn { DisplayFieldName = "\\\\Count", HeaderText = "Count", Width = 100 }; c1TreeView1.Columns.Add(column); column = new C1TreeColumn { DisplayFieldName = "\\\\Price", HeaderText = "Price", Width = 200 }; c1TreeView1.Columns.Add(column); c1TreeView1.DataSource = StoreCollection.GetData(); c1TreeView1.ExpandAll(); // init ExpressionEditor c1ExpressionEditor1.IntelliAutoCompletionEnabled = false; var ce = new ExpressionEditorCustomEngine.CustomEngine(); var cl = new CustomLexer(); c1ExpressionEditor1.SetCustomEngine(ce, cl); c1ExpressionEditor1.DataSource = c1TreeView1.DataSource; c1ExpressionEditor1.Expression = "[ProductsGroups].Where(x => x.Name == \"Notebooks\").Sum(x => x.Products.Sum(p => p.Count))"; var p = new CustomPresenter(); CustomPresenter.Editor = c1ExpressionEditor1; c1TreeView1.Columns[1].CustomContentPresenter = p; }
private void Initialize() { foreach (var theme in C1ThemeController.GetThemes()) { ribbonCmbThemes.Items.Add(theme); } c1TreeView1.Nodes[0].CheckState = CheckState.Checked; c1TreeView1.Nodes[1].CheckState = CheckState.Indeterminate; c1TreeView1.Nodes[0].Expanded = true; ribbonCBCheckBoxStates.Checked = true; ribbonCBExpandStates.Checked = true; ribbonCBEnabledTreeView.Checked = c1TreeView1.Enabled; }
private void Initialize() { foreach (var theme in C1ThemeController.GetThemes()) { ribbonCmbThemes.Items.Add(theme); } c1DockingTab1.VisualStyle = C1.Win.C1Command.VisualStyle.System; _loader = new Loader() { Visible = false, Dock = DockStyle.Fill }; panel1.Controls.Add(_loader); }
private void LoadThemes() { cmbThemes.Items.Clear(); var themes = C1ThemeController.GetThemes(); cmbThemes.Items.Add("None"); foreach (var theme in themes) { if (!theme.Contains("Office2010") && !theme.Contains("Office2007")) { cmbThemes.Items.Add(theme); } } cmbThemes.SelectedIndex = cmbThemes.Items.IndexOf("Office2016Colorful"); }
private void Form1_Load(object sender, EventArgs e) { // ctdbgThemes_Resize(null, EventArgs.Empty); // ctdbgThemes.SetDataBinding(); string[] themes = C1ThemeController.GetThemes(); foreach (string s in themes) { ctdbgThemes.AddRow(s); } // lblApplicationTheme.Value = C1ThemeController.ApplicationTheme; }
public Form1() { InitializeComponent(); foreach (SampleItem sample in SampleDataSource.AllItems) { lblSamples.Items.Add(sample); } lblSamples.SelectedIndex = 0; var themes = C1ThemeController.GetThemes(); cmbThemes.Items.Add("(none)"); foreach (var theme in themes) { cmbThemes.Items.Add(theme); } cmbThemes.SelectedIndex = 0; }
// ** ctor public OptionsForm() { // initialize component InitializeComponent(); // AutoScaleMode = AutoScaleMode.None; Font = MainForm.DefaultAppFont; if (IntPtr.Size == 4) { _chkWarn_AppIn64bitMode.Visible = false; } // Populate static option lists: // Grid units: this._cmbGridUnits.Items.Clear(); this._cmbGridUnits.Items.Add(Strings.OptionsForm.UnitsAuto); this._cmbGridUnits.Items.Add(Strings.OptionsForm.UnitsEnglish); this._cmbGridUnits.Items.Add(Strings.OptionsForm.UnitsMetric); this._cmbGridUnits.Items.Add(Strings.OptionsForm.UnitsCustom); // Data isolation level: _cmbIsolationLevel.Items.Clear(); IsolationLevel[] values = (IsolationLevel[])Enum.GetValues(typeof(IsolationLevel)); for (int i = 0; i < values.Length; i++) { _cmbIsolationLevel.Items.Add(values[i]); } // Themes: _cmbThemeBuiltIn.Items.AddRange(C1ThemeController.GetThemes()); _cmbThemeCustom.Items.AddRange(C1ThemeLocator.GetAvailableThemes(C1ThemeLocator.LocationType.ThemesFolder).ToArray()); if (_cmbThemeCustom.Items.Count == 0) { _cmbThemeCustom.Enabled = false; _rbtThemeCustom.Enabled = false; } // _chkReload_CheckedChanged(_chkReload, EventArgs.Empty); // _btnResetLayout.Enabled = MainForm.TheMainForm.ReportDesignMode; }
private void Form1_Load(object sender, EventArgs e) { // Create another form to show that changing ApplicationTheme automatically // propagages to all form in an application on which there is a C1ThemeController: var f2 = new Form2(); f2.SetDesktopLocation(this.DesktopBounds.Right + 10, this.DesktopBounds.Top); f2.Show(); // ctdbgThemes_Resize(null, EventArgs.Empty); // Get the list of available themes and populate the grid with them: ctdbgThemes.SetDataBinding(); string[] themes = C1ThemeController.GetThemes(); foreach (string s in themes) { ctdbgThemes.AddRow(s); } // tbApplicationTheme.Value = C1ThemeController.ApplicationTheme; }
private void InitializeRibbonStyleMenu() { ribbonStyleCombo.Items.Clear(); string[] themes = C1ThemeController.GetThemes(); var showThemes = themes.Where((tn) => { var ltn = tn.ToLower(); if (ltn.Contains("visualstyle")) // avoid old "visual style" themes { return(false); } else { return(true); } }); ribbonStyleCombo.Items.Add("(No Theme)"); foreach (string theme in showThemes) { ribbonStyleCombo.Items.Add(theme); } ribbonStyleCombo.SelectedIndex = 0; }
private void Themes_Load(object sender, EventArgs e) { cmbThemes.Items.AddRangeValues(C1ThemeController.GetThemes()); }
private void Form1_Load(object sender, EventArgs e) { string path = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + @"\ComponentOne Samples\Common\"; if (File.Exists(path + "c1nwind.mdb")) { AppDomain.CurrentDomain.SetData("DataDirectory", path); } // TODO: This line of code loads data into the 'c1NWINDDataSet.Employees' table. You can move, or remove it, as needed. this.employeesTableAdapter.Fill(this.c1NWINDDataSet.Employees); // // initialize C1Schedule // csMain.ShowReminderForm = false; DateTime now = DateTime.Now; Appointment app = csMain.DataStorage.AppointmentStorage.Appointments.Add(new DateTime(now.Year, now.Month, now.Day, now.Hour, 0, 0), TimeSpan.FromHours(1)); app.Subject = "test appointment"; app.Location = "test location"; app.Categories.Add(csMain.DataStorage.CategoryStorage.Categories[0]); app = csMain.DataStorage.AppointmentStorage.Appointments.Add(new DateTime(now.Year, now.Month, now.Day).AddDays(1), TimeSpan.FromHours(24)); app.Subject = "test event"; app.AllDayEvent = true; app.Location = "test location"; app.Categories.Add(csMain.DataStorage.CategoryStorage.Categories[0]); // // initialize C1TrueDBGrid // _trueGridOptions.ShowCaption = true; _trueGridOptions.ShowFilterBar = true; _trueGridOptions.ShowGroupByArea = true; _trueGridOptions.DataView = C1.Win.C1TrueDBGrid.DataViewEnum.Normal; // // initialize C1FlexGrid // _flexGridOptions.ViewMode = FlexViewModeEnum.Normal; _flexGridOptions.FrozenColCount = 3; rnbCFGFixedColCount.Minimum = 0; rnbCFGFixedColCount.Maximum = c1FlexGrid1.Cols.Count; rnbCFGFixedRowCount.Minimum = 0; rnbCFGFixedRowCount.Maximum = c1FlexGrid1.Rows.Count; // fill items of C1SplitButton used to select C1FlexGrid view mode FillItems(csbSelectionMode, typeof(SelectionModeEnum)); FillItems(csbFocusRect, typeof(FocusRectEnum)); FillItems(rcbCFGSelectionMode, typeof(C1.Win.C1FlexGrid.SelectionModeEnum)); FillItems(rcbCFGFocusRect, typeof(C1.Win.C1FlexGrid.FocusRectEnum)); // UpdateControls(); // UpdateMinimizeMaximize(); // c1DockingTab2_SelectedTabChanged(null, EventArgs.Empty); // fill list of themes string[] themes = C1ThemeController.GetThemes(); foreach (string theme in themes) { RibbonToggleButton rtb = new RibbonToggleButton(); rtb.Text = theme; rtb.Tag = theme; rtb.Click += OnThemeClick; rtb.Pressed = C1ThemeController.ApplicationTheme == theme; themeMenu.Items.Add(rtb); } themeMenu.Text = string.Format("Theme: {0}", C1ThemeController.ApplicationTheme); }
private void Form1_Load(object sender, EventArgs e) { string path = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + @"\ComponentOne Samples\Common\"; if (File.Exists(path + "c1nwind.mdb")) { AppDomain.CurrentDomain.SetData("DataDirectory", path); } // TODO: This line of code loads data into the 'c1NWINDDataSet.Employees' table. You can move, or remove it, as needed. this.employeesTableAdapter.Fill(this.c1NWINDDataSet.Employees); // // initialize C1Schedule // csMain.ShowReminderForm = false; DateTime now = DateTime.Now; Appointment app = csMain.DataStorage.AppointmentStorage.Appointments.Add(new DateTime(now.Year, now.Month, now.Day, now.Hour, 0, 0), TimeSpan.FromHours(1)); app.Subject = "test appointment"; app.Location = "test location"; app.Categories.Add(csMain.DataStorage.CategoryStorage.Categories[0]); app = csMain.DataStorage.AppointmentStorage.Appointments.Add(new DateTime(now.Year, now.Month, now.Day).AddDays(1), TimeSpan.FromHours(24)); app.Subject = "test event"; app.AllDayEvent = true; app.Location = "test location"; app.Categories.Add(csMain.DataStorage.CategoryStorage.Categories[0]); // // initialize C1TrueDBGrid // _trueGridOptions.ShowCaption = true; _trueGridOptions.ShowFilterBar = true; _trueGridOptions.ShowGroupByArea = true; _trueGridOptions.DataView = C1.Win.C1TrueDBGrid.DataViewEnum.Normal; // // initialize C1FlexGrid // _flexGridOptions.ViewMode = FlexViewModeEnum.Normal; _flexGridOptions.FrozenColCount = 3; // FillItems(ccmCFGSelectionMode, typeof(C1.Win.C1FlexGrid.SelectionModeEnum), SelectionModeCommandClick, SelectionModeCommandStateQuery); FillItems(ccmCFGFocusRect, typeof(C1.Win.C1FlexGrid.FocusRectEnum), FocusRectCommandClick, FocusRectCommandStateQuery); FillItems(csbSelectionMode, typeof(SelectionModeEnum)); FillItems(csbFocusRect, typeof(FocusRectEnum)); // UpdateControls(); // c1DockingTab2_SelectedTabChanged(null, EventArgs.Empty); // fill list of themes string[] themes = C1ThemeController.GetThemes(); ccmTheme.CommandLinks.Clear(); for (int i = 0; i < themes.Length; i++) { C1Command cmd = new C1Command(); cmd.Text = themes[i]; cmd.UserData = themes[i]; cmd.CommandStateQuery += OnThemeCommandStateQuery; cmd.Click += OnThemeClick; C1CommandLink cl = new C1CommandLink(cmd); ccmTheme.CommandLinks.Add(cl); } ccmTheme.Text = string.Format("Theme: {0}", C1ThemeController.ApplicationTheme); }