public override bool SaveAs() { string name = InputBox.Run(Texts.Get("s_enter_object_name"), "new_table"); if (name != null) { try { ISpecificObjectStructure newStructure = CreateStructure(new NameWithSchema(name)); if (m_conn.DatabaseCaps.ExecuteSql) { string sql = Dialect.GenerateScript(dmp => { dmp.CreateSpecificObject(newStructure); }); if (!SqlConfirmForm.Run(sql, Dialect)) { return(false); } } m_conn.CreateObject(newStructure); if (m_pars != null && m_pars.SavedCallback != null) { m_pars.SavedCallback(); } m_obj = m_conn.InvokeLoadSpecificObjectDetail(newStructure.ObjectType, newStructure.ObjectName); FillFromStructure(); UpdateTitle(); return(true); } catch (Exception err) { Errors.Report(err); } } return(false); }
private static string TranslateText(string text) { return(Texts.Get(text)); }
public void UpdateTitle() { Text = Texts.Get(m_factory.MenuTitle); }
protected override string GetConfirmDeleteMessage() { return(Texts.Get("s_really_delete$folder", "folder", Folder.ToString("F"))); }
protected virtual string GetConfirmDeleteMessage() { return(Texts.Get("s_really_delete$object", "object", ToString())); }
private void CreateDialog_Load(object sender, EventArgs e) { if (m_parent == null) { m_parent = new RootTreeNode(); } foreach (var item in CreateFactoryAddonType.GetItems(m_parent)) { if (!m_parent.AllowCreate(item.GroupName, item.Name)) { continue; } m_allItems.Add(item); } foreach (ICreateFactoryItem item in m_allItems) { Bitmap bmp = item.Bitmap; if (bmp != null) { m_imageIndexes[item] = imageList2.Images.Count; imageList2.Images.Add(item.Bitmap); } else { m_imageIndexes[item] = -1; } } if (!ShowGroups) { if (m_selectGroup != null && m_selectItem == null) { foreach (var item in m_allItems) { if (item.GroupName == m_selectGroup) { m_selectItem = item.Name; break; } } } listView1_SelectedIndexChanged(sender, e); return; } foreach (ICreateFactoryItem item in m_allItems) { if (item.Name == null || item.GroupName == null) { continue; } if (!m_parent.AllowCreate(item.GroupName, item.Name)) { continue; } if (!m_items.ContainsKey(item.GroupName)) { m_items[item.GroupName] = new List <ICreateFactoryItem>(); ListViewItem grp = lbxGroups.Items.Add(Texts.Get(item.Group)); grp.Name = item.GroupName; grp.ImageIndex = 0; } m_items[item.GroupName].Add(item); } int selgrp = 0; if (m_selectGroup != null) { int index = 0; foreach (ListViewItem item in lbxGroups.Items) { if (item.Name == m_selectGroup) { selgrp = index; } index++; } } foreach (var it in m_items) { it.Value.SortByKey(i => new Tuple <int, string>(-i.Weight, Texts.Get(i.Title))); } if (selgrp < lbxGroups.Items.Count) { lbxGroups.Items[selgrp].Focused = true; lbxGroups.Items[selgrp].Selected = true; listView1_SelectedIndexChanged(sender, e); } m_selectItem = null; m_selectGroup = null; }
public override string ToString() { return(Texts.Get("s_data_archive")); }
public override string ToString() { return(Texts.Get("s_log")); }
public ValueNotSpecifiedError(string errcode, string value) : base(errcode + " " + Texts.Get("s_value_not_specified$value", "value", Texts.Get(value)), null) { }
public IncorrectEmailError(string errcode, string email) : base(errcode + " " + Texts.Get("s_incorrect$email", "email", email), null) { }
public DataParseError(string data, TypeStorage type) : base(Texts.Get("s_cannot_convert$text$type", "text", data, "type", type), null) { }
public IncorrectObjectReferenceError(string errcode, string objtype, string objname) : base(errcode + " " + Texts.Get("s_incorrect_object_reference$objtype$objname", "objtype", objtype, "objname", objname), null) { }
public DatabaseNotAccessibleError(string dbname, Exception inner) : base(Texts.Get("s_database_not_accessible$database", "database", dbname) + "\n" + inner.Message, inner) { }
public ConnectionFailedError(string errcode, Exception inner) : base(errcode + " " + Texts.Get("s_connect_failed_with$error", "error", inner.Message), inner) { }
protected override void OnLinkClick(LinkClickEventArgs e) { base.OnLinkClick(e); string url = e.Href; if (url.StartsWith("'") && url.EndsWith("'")) { url = url.Substring(1, url.Length - 2); } if (url.StartsWith("\"") && url.EndsWith("\"")) { url = url.Substring(1, url.Length - 2); } if (url.StartsWith("http://") || url.StartsWith("mailto:")) { try { System.Diagnostics.Process.Start(url); } catch { StdDialog.ShowError(Texts.Get("s_cannot_open$url", "url", url)); } e.Handled = true; } if (url.StartsWith("callback://")) { e.Handled = true; try { string mtdname = url.Substring("callback://".Length); Dictionary <string, string> pars = null; if (mtdname.Contains("?")) { pars = new Dictionary <string, string>(); string[] pair = mtdname.Split('?'); mtdname = pair[0]; foreach (string parstr in pair[1].Split('&')) { string[] p2 = parstr.Split(':'); if (p2.Length != 2) { continue; } pars[p2[0]] = HttpUtility.UrlDecode(p2[1]); } } if (mtdname.EndsWith("/")) { mtdname = mtdname.Substring(0, mtdname.Length - 1); } object mtd = Procedures[mtdname]; if (mtd is Action) { ((Action)mtd)(); } else if (mtd is Action <Dictionary <string, string> > ) { ((Action <Dictionary <string, string> >)mtd)(pars); } else { // using reflection we call method, which name is after callback:// Type tp = mtd.GetType(); MethodInfo call = tp.GetMethod("Call", new Type[] { (new object[] { }).GetType() }); if (call != null) { call.Invoke(mtd, new object[] { new object[] { } }); } call = tp.GetMethod("Call", new Type[] { (new object[] { typeof(Dictionary <string, string>) }).GetType() }); if (call != null) { call.Invoke(mtd, new object[] { new object[] { pars } }); } } } catch (Exception err) { Errors.Report(err); } } }
public override string ToString() { return(Texts.Get("s_row_number")); }
protected void ReportFinish() { if (ProgressInfo != null) { if (m_failCount > 0) { ProgressInfo.LogMessage("s_import", LogLevel.Warning, "{0} OK:{1}, FAIL:{2}", Texts.Get("s_imported"), m_okCount, m_failCount); } else { ProgressInfo.LogMessage("s_import", LogLevel.Info, "{0} OK:{1}", Texts.Get("s_imported"), m_okCount); } } }
public DashboardAllreadyDesignedError(DockPanelDashboard dashboard) : base(Texts.Get("s_dashboard_is_allready_designed$file", "file", Path.GetFileName(dashboard.AddonFileName)), null) { }
public override string ToString() { return(Texts.Get("s_log") + ":" + FilePlace.ToString()); }
public CannotChangeTablePropertyError(string errcode) : base(errcode + " " + Texts.Get("s_cannot_change_table_property"), null) { }
public override string ToString() { return(Texts.Get(Title)); }
public AlterNotPossibleError() : base(Texts.Get("s_alter_not_possible"), null) { }
public override string ToString() { return(Texts.Get("s_loaded_rows")); }
public DataError(string errcode, Exception err) : base(errcode + " " + Texts.Get("s_data_error") + ":" + err.Message, err) { }
public DriverManagerFrame() { InitializeComponent(); openFileDialog1.Filter = String.Format("{0} (*.DLL)|*.dll|{0} (*.EXE)|*.exe", Texts.Get("s_assemblies")); Reload(); }
public ConnWizardForm(IStoredConnection conn) { InitializeComponent(); m_conn = conn; int top = ClientSize.Height - (btnOk.Top + btnOk.Height); int left = ClientSize.Width - (btnOk.Left + btnOk.Width); int wi = ClientSize.Width - 2 * left; var tun = m_conn as ITunellableStoredConnection; var parent = Controls; TabControl pg = null; if (tun != null) { pg = new TabControl(); var pg1 = new TabPage { Text = Texts.Get("s_connection") }; var pg2 = new TabPage { Text = Texts.Get("s_tunnelling") }; pg.TabPages.Add(pg1); pg.TabPages.Add(pg2); pg.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom; Controls.Add(pg); pg.Top = top; pg.Width = wi; pg.Left = left; m_tunCfg = new TunnelConfigFrame(); m_tunCfg.AllowDirectConnection = tun.AllowDirectConnection; m_tunCfg.SelectedDriver = tun.TunnelDriver; m_tunCfg.SelectedDriverChanged += new EventHandler(m_tunCfg_SelectedDriverChanged); pg2.Controls.Add(m_tunCfg); m_tunCfg.Dock = DockStyle.Fill; parent = pg1.Controls; top = 10; left = 10; wi = pg.Width - 20; pg.SelectedIndexChanged += pg_TabIndexChanged; } m_frame = m_conn.CreateEditor(); parent.Add(m_frame); m_frame.Left = left; m_frame.Top = top; m_frame.Width = wi; m_common = new CommonConnectionEditFrame(conn); parent.Add(m_common); m_common.Left = left; m_common.Top = m_frame.Height + top; m_common.Width = wi; m_common.LinkToSpecific(m_frame); Height = top + Height + m_frame.Height + m_common.Height + (tun != null ? 50 : 0); if (pg != null) { pg.Height = m_frame.Height + m_common.Height + 50; } Text = Texts.Get(m_conn.ConnectionTypeTitle); Translating.TranslateControl(this); btnAdvanced.Enabled = conn.ConnectionSettings != null; btnCtxhelp.Enabled = m_conn.HelpTopic != null; Usage["contype"] = conn.GetType().FullName; m_origHeight = Height; m_origWidth = Width; }
public override string ToString() { return(String.Format("{0}:{1}", Texts.Get("s_backup"), m_src)); }
public override string ToString() { return(Texts.Get("s_column_value")); }
//bool IsTheSame(IVirtualFolder folder) //{ // if (folder is OnServerFolder) // { // OnServerFolder other = (OnServerFolder)folder; // if (other.m_driver.Connection.SystemConnection.ConnectionString != m_driver.Connection.SystemConnection.ConnectionString) return false; // if (m_dbname != other.m_dbname) return false; // return true; // } // return false; //} #endregion public override string ToString() { return(Texts.Get("s_on_server") + ":" + m_folderName); }
public override string ToString() { return(Texts.Get("s_fixed_text")); }