public void HandleUseStyleButtonClick(SnippetsDataSet.SnippetsTableRow r) { UseStylesEventArgs args = new UseStylesEventArgs(); if (!r.IsNull(snippetsTable.NodeStyleColumn)) args.nodestyle = r.NodeStyle; if (!r.IsNull(snippetsTable.EdgeStyleColumn)) args.edgestyle = r.EdgeStyle; if (!r.IsNull(snippetsTable.DependenciesColumn)) args.dependencies = r.Dependencies; args.InAddition = System.Windows.Forms.Control.ModifierKeys.HasFlag(Keys.Control); TheView.RaiseOnUseStyle(args); }
public void HandleInsertDependenciesClick(SnippetsDataSet.SnippetsTableRow r) { string d = ""; if (!r.IsNull(snippetsTable.DependenciesColumn)) d = r.Dependencies; TheView.RaiseOnInsert(new InsertEventArgs() { code = @"\usetikzlibrary{" + d + "}" + Environment.NewLine, dependencies = d }); }
public void HandleInsertAsTikzStyleClick(SnippetsDataSet.SnippetsTableRow r) { string toinsert = "", dependencies = ""; if (!r.IsNull(snippetsTable.NodeStyleColumn) && !(r.NodeStyle.Trim() == "")) toinsert += "\\tikzstyle{mynodestyle} = [" + r.NodeStyle + "]" + Environment.NewLine; if (!r.IsNull(snippetsTable.EdgeStyleColumn) && !(r.EdgeStyle.Trim() == "")) toinsert += "\\tikzstyle{myedgestyle} = [" + r.EdgeStyle + "]" + Environment.NewLine; if (!r.IsNull(snippetsTable.DependenciesColumn)) dependencies = r.Dependencies; TheView.RaiseOnInsert(new InsertEventArgs() { code = toinsert, dependencies = dependencies }); }
public void HandleInsertFullCodeClick(SnippetsDataSet.SnippetsTableRow r) { string c = "", d = ""; if (!r.IsNull(snippetsTable.SampleCodeColumn)) c = r.SampleCode; if (!r.IsNull(snippetsTable.DependenciesColumn)) d = r.Dependencies; TheView.RaiseOnInsert(new InsertEventArgs() { code = c, dependencies = d }); }