private void MenuItem_Open_Click(object sender, RoutedEventArgs e) { _sourceBitmap = Cip.CipTools.OpenImage(); _currentBitmap = _sourceBitmap; if (_sourceBitmap != null) { _pictureBoxOriginal.Image = _sourceBitmap; _pictureBoxModifyed.Image = _sourceBitmap; _sourceRaster = new Raster(_sourceBitmap); this._undoList.ClearCollection(); this._undoList.Add(this._sourceRaster); } }
private void Window_Loaded(object sender, RoutedEventArgs e) { this._pictureBoxOriginal = (PictureBox)this.windowsFormsHost1.Child; this._pictureBoxModifyed = (PictureBox)this.windowsFormsHost2.Child; this._pictureBoxOriginal.SizeMode = PictureBoxSizeMode.Zoom; this._pictureBoxModifyed.SizeMode = PictureBoxSizeMode.Zoom; this._sourceBitmap = this._currentBitmap = global::Cip.WpfDemo.Properties.Resources.Image_bandon; this._pictureBoxOriginal.Image = _currentBitmap; this._pictureBoxModifyed.Image = _currentBitmap; this._sourceRaster = new Raster(this._sourceBitmap); this._undoList = new CipUndoList<Raster>(); this._undoList.Add(_sourceRaster); CipCheckEditMenu(); //this.editDefaultItem.AddHandler this._bNeedUpdate = false; this._mutex = new Mutex(); this._timer = new System.Threading.Timer(new TimerCallback(this.CipTimerCheckProc)); this._timer.Change(0, 1000); this._timerWinForms = new System.Windows.Forms.Timer(); this._timerWinForms.Tick += new EventHandler(TimerWinForms_Tick); this._timerWinForms.Interval = 1000; this._timerWinForms.Start(); this.MakeProgressBar(sender, e); //Windows7 gadgets initialization if (_osVersion.GetOsTypeId() == CipOsType.Windows61) CipWin7SuperBarInitialization(); }