public static void setStringAll(WooTable _mo, string _varianter = "") { foreach (Microsoft.Office.Tools.Ribbon.RibbonGroup _grp in _mo.tab1.Groups) { setString(_grp, _varianter); } }
public static void setGroupNames(WooTable _mo) { foreach (Microsoft.Office.Tools.Ribbon.RibbonGroup _grp in _mo.tab1.Groups) { _grp.Label = Resources.Labels.ResourceManager.GetString("Ribbon_Groups_" + _grp.Name); } }
//public HashSet<Word.Range> TotalRange = new HashSet<Word.Range>(); public static Resident Resident_getInstance(WooTable _MasterObject) { //get { if (_inst == null) { _inst = new Resident(_MasterObject); } return(_inst); } }
public Form_CurrencyConverter(WooTable _ribbon, double _value) { InitializeComponent(); StringSetter.LocalizeMe((Form)this); _cconvert = CurrencyConverter.CurrencyConverter_getInstance; _master = _ribbon; _val = _value; Form_CurrencyConverter_text_risk.Text = Properties.Settings.Default.Curr_Risk.ToString(); }
/*public TabPrewFactory(WooTable _mo, int _tableIndex) * { * ThisApp = Globals.ThisAddIn.Application; * ThisApp.ActiveDocument.Tables[_tableIndex].Range.CopyAsPicture(); * System.Drawing.Image _img = Clipboard.GetImage(); * * Microsoft.Office.Tools.Ribbon.RibbonButton _lab = _mo.Factory.CreateRibbonButton(); * _lab.ShowLabel = false; * _lab.Enabled = false; * _lab.Image = _img; * _obj = _lab; * }*/ public static Microsoft.Office.Tools.Ribbon.RibbonControl CreateTabPrew(WooTable _mo, int _tableIndex) { ThisApp = Globals.ThisAddIn.Application; ThisApp.ActiveDocument.Tables[_tableIndex].Range.CopyAsPicture(); System.Drawing.Image _img = Clipboard.GetImage(); Microsoft.Office.Tools.Ribbon.RibbonButton _lab = _mo.Factory.CreateRibbonButton(); _lab.ShowLabel = false; _lab.Enabled = false; _lab.Image = _img; _obj = _lab; return(_obj); }
public Form_NumberFormat(WooTable _ribbon, double _selection) { InitializeComponent(); _grid = Form_NumberFormat_grid_Formats; try { ThisRibbon = _ribbon; ThisSelection = _selection; for (int i = 0; i < 4; i++) { _grid.Rows.Add(); } //_grid[0, 0].Value = "Currency"; _grid[0, 0].Value = Resources.Labels.ResourceManager.GetString(_grid.Name + "_val1"); _grid[1, 0].Value = "$#,##0.00;[Red]$#,##0.00"; //_grid[0, 1].Value = "Accounting"; _grid[0, 1].Value = Resources.Labels.ResourceManager.GetString(_grid.Name + "_val2"); _grid[1, 1].Value = "_($* #,##0.00_);_($* (#,##0.00);_($* \" - \"??_);_(@_)"; //_grid[0, 2].Value = "Scientific"; _grid[0, 2].Value = Resources.Labels.ResourceManager.GetString(_grid.Name + "_val3"); _grid[1, 2].Value = "0.00E+00"; //_grid[0, 3].Value = "Custom.."; _grid[0, 3].Value = Resources.Labels.ResourceManager.GetString(_grid.Name + "_val4"); // try to get the examples _grid[2, 0].Value = ThisSelection.ToString(_grid[1, 0].Value.ToString()); _grid[2, 1].Value = ThisSelection.ToString(_grid[1, 1].Value.ToString()); _grid[2, 2].Value = ThisSelection.ToString(_grid[1, 2].Value.ToString()); _grid.Update(); } catch (Exception E) { System.Windows.Forms.MessageBox.Show("Could not generate data grid: " + E.Message, "WooTable .::. Error", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error); } }
private Resident(WooTable _MasterObject) { try { ThisApp = Globals.ThisAddIn.Application; setMasterObject(_MasterObject); try { if (Properties.Settings.Default.Culture == "") { Properties.Settings.Default.Culture = Thread.CurrentThread.CurrentUICulture.Name; Properties.Settings.Default.CultureString = Thread.CurrentThread.CurrentUICulture.NativeName; } Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(Properties.Settings.Default.Culture); } catch { Properties.Settings.Default.Culture = Thread.CurrentThread.CurrentUICulture.Name; Properties.Settings.Default.CultureString = Thread.CurrentThread.CurrentUICulture.NativeName; Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(Thread.CurrentThread.CurrentUICulture.Name); } StringSetter.setStringAll(MasterObject, "tip"); StringSetter.setStringAll(MasterObject, "label"); StringSetter.setGroupNames(MasterObject); //these are the ribbon groups labels // start up Startup(); } catch (Exception E) { System.Windows.Forms.MessageBox.Show("Could not initialize the resident service: " + E.Message + ". Am stopping it.", "WooTable .::. Error", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error); _inst = null; } }
public Form_Settings(WooTable _ribbon) { ThisRibbon = _ribbon; InitializeComponent(); }
public void setMasterObject(WooTable _MasterObject) { MasterObject = _MasterObject; }