Example #1
0
 //! 构造放大镜绘图视图
 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);
 }
Example #2
0
 public void Dispose()
 {
     if (this.View != null)
     {
         this.View.Dispose();
         this.View = null;
     }
 }
Example #3
0
 public void Dispose()
 {
     if (this.View != null)
     {
         this.View.Dispose();
         this.View = null;
     }
 }
Example #4
0
        //! 开始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()));
        }
Example #5
0
 public override void Dispose()
 {
     _owner = null;
     base.Dispose();
 }
Example #6
0
 public WPFViewAdapter(WPFGraphView owner)
 {
     this._owner = owner;
     ActionImages = new List<Image>();
 }
Example #7
0
 public WPFViewHelper(WPFGraphView view)
 {
     this.View = view;
 }
Example #8
0
        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;
        }
Example #9
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";
        }
Example #10
0
 public WPFViewHelper()
 {
     this.View = WPFGraphView.ActiveView;
 }
Example #11
0
 public override void Dispose()
 {
     _owner = null;
     base.Dispose();
 }
Example #12
0
 public WPFViewAdapter(WPFGraphView owner)
 {
     this._owner  = owner;
     ActionImages = new List <Image>();
 }
Example #13
0
 public WPFViewHelper(WPFGraphView view)
 {
     this.View = view != null ? view : WPFGraphView.ActiveView;
 }
Example #14
0
 public WPFViewHelper()
 {
     this.View = WPFGraphView.ActiveView;
 }
Example #15
0
 //! 构造放大镜绘图视图
 public WPFGraphView(WPFGraphView mainView, Panel container)
 {
     this._view    = new WPFViewAdapter(this);
     this.CoreView = GiCoreView.createMagnifierView(this._view, mainView.CoreView, mainView.ViewAdapter);
     init(container);
 }
Example #16
0
 public WPFViewHelper(WPFGraphView view)
 {
     this.View = view != null ? view : WPFGraphView.ActiveView;
 }
Example #17
0
 //! 返回已录制的相对毫秒数
 public int GetRecordTicks()
 {
     return(CoreView.getRecordTick(false, WPFGraphView.getTick()));
 }