/*protected void EncryptAs() * { * if (this.treeViewTemplates.SelectedNode is TemplateTreeNode) * { * DialogResult dr = MessageBox.Show(this, * "Be careful not to overwrite your source template or you will lose your work!\r\n Are you ready to Encrypt?", * "Encryption Warning", * MessageBoxButtons.OKCancel, * MessageBoxIcon.Information); * if (dr == DialogResult.OK) * { * ZeusTemplate template = new ZeusTemplate( ((TemplateTreeNode)treeViewTemplates.SelectedNode).FullPath ); * if (template.SourceType != ZeusConstants.SourceTypes.SOURCE) * { * template.Encrypt(); * SaveAs(template); * } * } * } * } * * protected void CompileAs() * { * if (this.treeViewTemplates.SelectedNode is TemplateTreeNode) * { * DialogResult dr = MessageBox.Show(this, * "In order to finish compiling a template, the template must be executed completely.\r\nBe careful not to overwrite your source template or you will lose your work!\r\n Are you ready to Compile?", * "Compilation Warning", * MessageBoxButtons.OKCancel, * MessageBoxIcon.Information); * if (dr == DialogResult.OK) * { * ZeusTemplate template = new ZeusTemplate( ((TemplateTreeNode)treeViewTemplates.SelectedNode).FullPath ); * if (template.SourceType != ZeusConstants.SourceTypes.SOURCE) * { * template.Compile(); * this.Execute(); * } * * SaveAs(template); * * this.menuItemCompileAs.Enabled = false; * this.menuItemEncryptAs.Enabled = false; * } * } * } * * protected void SaveAs(ZeusTemplate template) * { * SaveFileDialog saveFileDialog = new SaveFileDialog(); * * saveFileDialog.Filter = TemplateEditor.FILE_TYPES; * saveFileDialog.FilterIndex = TemplateEditor.DEFAULT_SAVE_FILE_TYPE_INDEX; * saveFileDialog.RestoreDirectory = true; * * saveFileDialog.FileName = this.FileName; * * if(saveFileDialog.ShowDialog() == DialogResult.OK) * { * this.FileSaveAs(saveFileDialog.FileName); * } * }*/ public void RefreshTree() { treeBuilder.Clear(); if (this.toolBarButtonMode.Pushed) { this.treeBuilder.LoadTemplatesByFile(); } else { this.treeBuilder.LoadTemplates(); } }
public void RefreshTree() { _treeBuilder.Clear(); if (this.toolStripButtonMode.Checked) { this._treeBuilder.LoadTemplatesByFile(); } else { this._treeBuilder.LoadTemplates(); } }
public void RefreshTree() { treeBuilder.Clear(); this.treeBuilder.LoadTemplatesFromWeb(); }