//! 构造放大镜绘图视图 public WPFGraphView(WPFGraphView mainView, Panel container) { this.CoreView = new GiCoreView(mainView.CoreView); this._view = new WPFViewAdapter(this); this.CoreView.createMagnifierView(this._view, mainView.ViewAdapter); init(container); }
public void Dispose() { if (this.View != null) { this.View.Dispose(); this.View = null; } }
//! 开始Undo录制 public bool StartUndoRecord(string path) { if (CoreView.isUndoRecording()) { return(false); } try { var dir = new DirectoryInfo(path); if (dir.Exists) { dir.Delete(true); } dir.Create(); } catch (IOException) { return(false); } return(CoreView.startRecord(path, CoreView.acquireFrontDoc(), true, WPFGraphView.getTick())); }
public override void Dispose() { _owner = null; base.Dispose(); }
public WPFViewAdapter(WPFGraphView owner) { this._owner = owner; ActionImages = new List<Image>(); }
public WPFViewHelper(WPFGraphView view) { this.View = view; }
void Window1_Loaded(object sender, RoutedEventArgs e) { _view = new WPFGraphView(canvas1); _helper = new WPFViewHelper(_view); _view.OnCommandChanged += new CommandChangedEventHandler(View_OnCommandChanged); _view.OnSelectionChanged +=new touchvg.view.SelectionChangedEventHandler(View_OnSelectionChanged); List<KeyValuePair<string, string>> commandSource = new List<KeyValuePair<string, string>>(); for (int i = 0; i < _commands.Length; i += 2) { commandSource.Add(new KeyValuePair<string, string>(_commands[i], _commands[i + 1])); } this.comboBox1.DisplayMemberPath = "Key"; this.comboBox1.SelectedValuePath = "Value"; this.comboBox1.ItemsSource = commandSource; this.comboBox1.SelectedIndex = 0; }
void Window1_Loaded(object sender, RoutedEventArgs e) { _view = new WPFGraphView(canvas1); _view.OnCommandChanged += new CommandChangedEventHandler(View_OnCommandChanged); _view.OnSelectionChanged += new touchvg.view.SelectionChangedEventHandler(View_OnSelectionChanged); List<KeyValuePair<string, string>> commandSource = new List<KeyValuePair<string, string>>(); for (int i = 0; i < _commands.Length; i += 2) { commandSource.Add(new KeyValuePair<string, string>(_commands[i], _commands[i + 1])); } this.cboCmd.DisplayMemberPath = "Key"; this.cboCmd.SelectedValuePath = "Value"; this.cboCmd.ItemsSource = commandSource; this.cboCmd.SelectedIndex = 0; List<KeyValuePair<string, string>> lineStyleSource = new List<KeyValuePair<string, string>>(); for (int i = 0; i < _lineStyles.Length; i += 2) { lineStyleSource.Add(new KeyValuePair<string, string>(_lineStyles[i], _lineStyles[i + 1])); } this.cboLineStyle.DisplayMemberPath = "Key"; this.cboLineStyle.SelectedValuePath = "Value"; this.cboLineStyle.ItemsSource = lineStyleSource; this.cboLineStyle.SelectedIndex = 0; _helper = new WPFViewHelper(_view); DemoCmds.registerCmds(_helper.CmdViewHandle()); _helper.Load("C:\\Test\\page.vg"); _helper.StartUndoRecord("C:\\Test\\undo"); _helper.Command = "select"; }
public WPFViewHelper() { this.View = WPFGraphView.ActiveView; }
public WPFViewAdapter(WPFGraphView owner) { this._owner = owner; ActionImages = new List <Image>(); }
public WPFViewHelper(WPFGraphView view) { this.View = view != null ? view : WPFGraphView.ActiveView; }
//! 构造放大镜绘图视图 public WPFGraphView(WPFGraphView mainView, Panel container) { this._view = new WPFViewAdapter(this); this.CoreView = GiCoreView.createMagnifierView(this._view, mainView.CoreView, mainView.ViewAdapter); init(container); }
//! 返回已录制的相对毫秒数 public int GetRecordTicks() { return(CoreView.getRecordTick(false, WPFGraphView.getTick())); }