コード例 #1
0
ファイル: CellLocation.cs プロジェクト: nicosurf/SIFEI
 /// <summary>
 /// Draws the respecting Icon for this cell
 /// </summary>
 private void DrawIcon()
 {
     try
     {
         var container = new CellErrorInfoContainer();
         container.SuspendLayout();
         container.ElementHost.Child = new CellErrorInfo
         {
             DataContext = this, Visibility = Visibility.Visible, Opacity = 1.00
         };
         container.ElementHost.Child.UpdateLayout();
         var vsto = Globals.Factory.GetVstoObject(Worksheet);
         controlName       = Guid.NewGuid().ToString();
         container.Visible = false;
         container.ResumeLayout(true);
         control           = vsto.Controls.AddControl(container, Worksheet.Range[ShortLocation], controlName);
         control.Visible   = false;
         control.Width     = control.Height + 4;
         control.Placement = XlPlacement.xlMoveAndSize;
         control.AutoLoad  = true;
         container.Visible = true;
     }
     catch (Exception ex)
     {
         Console.Out.WriteLine(ex.ToString());
     }
 }
コード例 #2
0
ファイル: Cell.cs プロジェクト: JeffryTara92/SIFEI-1
 /// <summary>
 ///     Draws the respecting Icon for this cell
 /// </summary>
 public void DrawIcon()
 {
     if (control == null)
     {
         try
         {
             var container = new CellErrorInfoContainer();
             container.SuspendLayout();
             container.ElementHost.Child = new CellErrorInfo
             {
                 DataContext = this,
                 Visibility  = Visibility.Visible
             };
             container.ResumeLayout(true);
             var vsto = Globals.Factory.GetVstoObject(Worksheet);
             controlName    = Guid.NewGuid().ToString();
             control        = vsto.Controls.AddControl(container, Worksheet.Range[ShortLocation], controlName);
             control.Width  = 13;
             control.Height = 13;
         }
         catch (Exception e)
         {
             Debug.WriteLine(e);
         }
     }
 }
コード例 #3
0
ファイル: CellLocation.cs プロジェクト: kuleszdl/SIFEI
 /// <summary>
 /// Draws the respecting Icon for this cell
 /// </summary>
 private void DrawIcon()
 {
     try
     {
         var container = new CellErrorInfoContainer();
         container.SuspendLayout();
         container.ElementHost.Child = new CellErrorInfo
         {
             DataContext = this, Visibility = Visibility.Visible, Opacity = 1.00
         };
         container.ElementHost.Child.UpdateLayout();
         var vsto = Globals.Factory.GetVstoObject(Worksheet);
         controlName = Guid.NewGuid().ToString();
         container.Visible = false;
         container.ResumeLayout(true);
         control = vsto.Controls.AddControl(container, Worksheet.Range[ShortLocation], controlName);
         control.Visible = false;
         control.Width = control.Height + 4;
         control.Placement = XlPlacement.xlMoveAndSize;
         control.AutoLoad = true;
         container.Visible = true;
     }
     catch (Exception ex)
     {
         Console.Out.WriteLine(ex.ToString());
     }
 }