Ejemplo n.º 1
0
 private void CopySelected()
 {
     Clipboard.Clear();
     if (pkExtDesigner.SelectedItem != null)
     {
         string tempObject = PKStorage.Serialize(pkExtDesigner.SelectedItem);
         Clipboard.SetText(tempObject);
     }
 }
Ejemplo n.º 2
0
 private void listView1_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     if (this.ControlSelected != null && listView1.SelectedItems.Count > 0)
     {
         var selectedControl = listView1.SelectedItems[0].Tag as PKControl;
         var copyControl     = PKStorage.Deserialize(PKStorage.Serialize(selectedControl)) as PKControl;
         copyControl.IsComponent       = true;
         copyControl.ComponentFileName = selectedControl.ComponentFileName;
         this.ControlSelected(copyControl);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 ///
 /// </summary>
 public void Checkpoint()
 {
     if (!working)
     {
         string str = PKStorage.Serialize(currentPage.AppPage);
         if (str != lastState)
         {
             undoBuffers.Push(str);
             lastState = str;
         }
     }
 }
Ejemplo n.º 4
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (saveFileDialog1.ShowDialog() == DialogResult.OK)
            {
                PKControl cmp = this.pkExtDesigner.AppPage;
                //cmp.ComponentFileName = Path.GetFileName(saveFileDialog1.FileName);
                //cmp.IsComponent = true;
                string strJSON = PKStorage.Serialize(cmp);

                File.WriteAllText(saveFileDialog1.FileName, strJSON);
            }
        }