Exemple #1
0
 public void _createMethodShape(string nNamespace, string nName)
 {
     ProjectCanvas projectCanvas_ = this._getObject() as ProjectCanvas;
     if (null != nNamespace)
     {
         mClassShape = new ClassShape();
         mClassShape._setNameSpace(nNamespace);
         mClassShape._setName(nName);
         projectCanvas_._addClassShape(mClassShape);
         return;
     }
     if (projectCanvas_._haveClass(nName))
     {
         mClassShape = new ClassShape();
         mClassShape._setName(nName);
         projectCanvas_._addClassShape(mClassShape);
         return;
     }
     DialogResult dialogResult_ = MessageBox.Show(@"这个类名不存在,是否创建此类?", "创建类", MessageBoxButtons.YesNo);
     if (dialogResult_ == DialogResult.No)
     {
         return;
     }
     projectCanvas_._createClass(nName);
     mClassShape = new ClassShape();
     mClassShape._setName(nName);
     projectCanvas_._addClassShape(mClassShape);
 }
Exemple #2
0
 public override void _runCommand()
 {
     IForm form_ = this._getOwner() as IForm;
     ITextBox textBox_ = form_._childControl(@"className") as ITextBox;
     string text_ = textBox_._getText();
     string name_ = StringFormat._className(text_);
     if (null == name_)
     {
         MessageBox.Show(@"类名不合法!");
         return;
     }
     string namespace_ = null;
     IComboBox comboBox_ = form_._childControl(@"comboBox1") as IComboBox;
     if (comboBox_._isEnable())
     {
         namespace_ = comboBox_._getSelectText();
     }
     ClassShape classShape_ = null;
     if (null != namespace_)
     {
         classShape_ = new ClassShape();
         classShape_._setNameSpace(namespace_);
         classShape_._setName(name_);
         form_._setTag(classShape_);
         form_._runClose();
         return;
     }
     ProjectCanvas projectCanvas_ = form_._getTag() as ProjectCanvas;
     //projectCanvas_.
     //MessageBox.Show(@"")
     classShape_ = new ClassShape();
     classShape_._setName(name_);
     form_._setTag(classShape_);
     form_._runClose();
 }
Exemple #3
0
 public override void _setEnd(IRect nRect)
 {
     mEndClassShape = nRect as ClassShape;
     base._setEnd(mEndClassShape);
 }
Exemple #4
0
 public override void _setBeg(IRect nRect)
 {
     mBegClassShape = nRect as ClassShape;
     base._setBeg(mBegClassShape);
 }
Exemple #5
0
 public DeriveShape()
 {
     mBegClassShape = null;
     mEndClassShape = null;
 }
Exemple #6
0
 public void _addClassShape(ClassShape nClassShape)
 {
     mClassShapes.Add(nClassShape);
     base._runDirty();
 }
Exemple #7
0
 public ClassCreator()
 {
     mClassShape = null;
 }