static public void GenerateHotfixIndexFile() { HotfixIndexFile indexFile = new HotfixIndexFile(); #if UNITY_IOS FileInfo mainfestFile = new FileInfo(HotfixBuild.BundleFilesDir + "/iOS"); #else FileInfo mainfestFile = new FileInfo(HotfixBuild.BundleFilesDir + "/Android"); #endif if (mainfestFile.Exists) { indexFile.AddFile(mainfestFile); } FileInfo[] files = GetDirFiles(HotfixBuild.HotfixDir); for (int i = 0; i < files.Length; i++) { indexFile.AddFile(files[i]); } int version = HotfixBuild.GetHotfixVersion(); string fileName = HotfixBuild.HotfixDir + "/HotfixConfig_v" + version + ".zip"; indexFile.GenerateBin(fileName, HotfixFileFormat.EncryptZip, version); ClipBoard.Copy(MD5Util.Get(fileName)); EditorUtility.DisplayDialog("GenerateHotfixIndexFile", "生成HotfixIndexFile完成!", "Close"); }
private void CYB_Click(object sender, EventArgs e) { try { if (TACB.SelectedItem.ToString() == "RGB") { if (ClipBoard.GetText() != CHTB.Text) { ClipBoard.CopyText(CHTB.Text); CHTB.Focus(); } } else { if (ClipBoard.GetText() != CRTB.Text + ", " + CGTB.Text + ", " + CBTB.Text) { ClipBoard.CopyText(CRTB.Text + ", " + CGTB.Text + ", " + CBTB.Text); CGTB.Focus(); } } } catch { // } }
private static void CopyGameObjectPath() { UnityEngine.Object obj = Selection.activeObject; if (obj == null) { Debug.LogError("You must select Obj first!"); return; } string result = AssetDatabase.GetAssetPath(obj); if (string.IsNullOrEmpty(result))//如果不是资源则在场景中查找 { Transform selectChild = Selection.activeTransform; if (selectChild != null) { result = selectChild.name; while (selectChild.parent != null) { selectChild = selectChild.parent; result = string.Format("{0}/{1}", selectChild.name, result); } } } ClipBoard.Copy(result); Debug.Log(string.Format("The gameobject:{0}'s path has been copied to the clipboard!", obj.name)); }
string SerializeGraphElementsCallback(IEnumerable <GraphElement> elements) { var data = new ClipBoard(); foreach (var element in elements) { switch (element) { case BaseNodeView nodeView: data.copiedNodes.Add(nodeView.Model); continue; case BaseEdgeView edgeView: data.copiedEdges.Add(edgeView.Model); continue; //case StackView stackView: // data.copiedStacks.Add(stackView.Model); // continue; case GroupView groupView: data.copiedGroups.Add(groupView.Model); continue; default: continue; } } return(Encoding.UTF8.GetString(SerializationUtility.SerializeValue(data, DataFormat.JSON, out ClipBoard.objectReferences))); }
protected void CopyCutHandler(bool cut) { ArrayList selfiles = new ArrayList(); CheckBox chkSelect; FileSystem fs = new FileSystem(Globals.CurrentIdentity); foreach (DataGridItem item in dgFiles.Items) { if (null != (chkSelect = (CheckBox)item.FindControl("chkSelect"))) { if (chkSelect.Checked) { selfiles.Add((int)dgFiles.DataKeys[item.ItemIndex]); } } } if (selfiles.Count > 0) { ViewState["clipboard"] = new ClipBoard(selfiles, cut); } else { DisplayMessage("No files selected. To cut/copy files check the boxes on their left"); } BindClipBoard(); }
private void OnQuery_COPY_CLIPBOARD() { ClipBoard.SetClipBoard(MonoBehaviourSingleton <UserInfoManager> .I.userInfo.code); GameSection.SetEventData(new object[1] { MonoBehaviourSingleton <UserInfoManager> .I.userInfo.code }); }
private void Button17_Click(object sender, EventArgs e) { if (button17.Cursor == Cursors.Hand) { button17.Cursor = Cursors.No; ClipBoard.CopyText(textBox13.Text, false); } }
public void OnCopy(GameObject focusedObject) { if (IsPrefab(focusedObject)) { CopiedObject = new ClipBoard(focusedObject); AudioPlayer.Play(); } }
/// <summary> /// Executes the clipboard operation /// </summary> /// <param name="targetFolder">The target folder of the operation</param> /// <returns>A task representing the operation</returns> public async Task <DriveItem> PasteAsync(DriveFolder targetFolder) { var task = ClipBoard.ExecuteAsync(targetFolder); ClipBoard.Clear(); return(await task); }
void OpenFileImpl(OpenFileCommand command) { string xmlFilePath = command.XmlFilePath; OpenInternal(xmlFilePath); //clear the clipboard to avoid copying between dyns ClipBoard.Clear(); }
static void OnShowOptions(RoadEditorCollapsiblePanel groupPanel) { try { Array array = groupPanel.GetArray(); var target = groupPanel.GetTarget(); if (groupPanel.GetArray() is NetLaneProps.Prop[] m_props) { bool hasItems = m_props.Length > 0; bool clipBoardHasData = ClipBoard.HasData <NetLaneProps.Prop>(); if (hasItems || clipBoardHasData) { var panel = MiniPanel.Display(); if (hasItems) { panel.AddButton("Copy all props", null, () => ClipBoard.SetData(m_props)); panel.AddButton("Clear all props", null, () => ClearAll(groupPanel)); panel.AddButton("Save Template", null, () => { SaveTemplatePanel.Display(m_props); }); } if (clipBoardHasData) { panel.AddButton("Paste all props", null, () => PasteAll(groupPanel)); } panel.AddButton( "Displace all", null, () => DisplaceAll(m_props)); } } else if ( array is NetInfo.Lane[] m_lanes && m_lanes.Any(_lane => _lane.HasProps()) && target == NetInfoExtionsion.EditedNetInfo) { var panel = MiniPanel.Display(); panel.AddButton( "Copy props to other elevation", "appends props to other elevations", () => PropHelpers.CopyPropsToOtherElevations(clear: false)); panel.AddButton( "replace props to other elevation", "clears props from other elevations before copying.", () => PropHelpers.CopyPropsToOtherElevations(clear: true)); panel.AddButton( "Displace all", null, () => RoadEditorUtils.DisplaceAllProps(m_lanes)); } } catch (Exception ex) { Log.Exception(ex); } }
/// <summary> /// Cancels the monitoring of the current user's asynchronous operations and clears the service's data /// </summary> private void OnUserLogout() { foreach (var operation in CurrentOperations) { operation.Cancel(); } Cache.Clear(); ClipBoard.Clear(); DriveId = null; }
private static void SetClipBoardData() { if (Clipboard.ContainsText()) { ClipBoard = SetEncodingDefault(Clipboard.GetText()); if (ClipBoard.Contains("\n")) { ClipBoardLines = ClipBoard.Split('\n').ToList(); } } }
private static void Game_OnUpdate(EventArgs args) { if (CopyPaste["DisablePaste"].Cast <CheckBox>().CurrentValue) { return; } if (Sent) { return; } var delay = CopyPaste["Delay"].Cast <Slider>().CurrentValue; if (CopyPaste["Paste"].Cast <KeyBind>().CurrentValue) { SetClipBoardData(); if (!ClipBoard.Contains("\n")) { Chat.Say(ClipBoard); Sent = true; Core.DelayAction(() => Sent = false, delay); } else { foreach (var s in ClipBoardLines) { Chat.Say(s); } Sent = true; Core.DelayAction(() => Sent = false, delay); ClipBoardLines.Clear(); } } if (CopyPaste["PasteForAll"].Cast <KeyBind>().CurrentValue) { SetClipBoardData(); if (!ClipBoard.Contains("\n")) { Chat.Say("/all " + ClipBoard); Sent = true; Core.DelayAction(() => Sent = false, delay); } else { foreach (var s in ClipBoardLines) { Chat.Say("/all " + s); } Sent = true; Core.DelayAction(() => Sent = false, delay); ClipBoardLines.Clear(); } } }
public static void SetClipboardText(string Text) { #if __IOS__ ClipBoard.String = Text; #elif __ANDROID__ ClipBoard.Text = Text; #elif NETFX_CORE var ItemToSet = new Windows.ApplicationModel.DataTransfer.DataPackage(); ItemToSet.SetText(Text); ClipBoard.SetContent(ItemToSet); #endif }
/* Used for initialization. */ void Start() { mode = new Mode(); CopiedObject = null; AudioPlayer = gameObject.AddComponent <AudioSource>(); AudioPlayer.playOnAwake = false; AudioPlayer.spatialize = true; AudioPlayer.spatialBlend = 1.0f; AudioPlayer.dopplerLevel = 0.0f; AudioPlayer.rolloffMode = AudioRolloffMode.Logarithmic; AudioPlayer.maxDistance = 20f; AudioPlayer.clip = CopyNoise; }
private void PEB_Click(object sender, EventArgs e) { try { if (ClipBoard.GetText() != CRTB.Text) { CRTB.Text = ClipBoard.GetText(); CRTB.Focus(); } } catch { // } }
private void CYB_Click(object sender, EventArgs e) { try { if (ClipBoard.GetText() != URTB.Text) { ClipBoard.CopyText(URTB.Text); URTB.Focus(); } } catch { // } }
private void Button14_Click(object sender, EventArgs e) { try { if (button14.Cursor == Cursors.Hand) { button14.Cursor = Cursors.No; ClipBoard.CopyText(textBox12.Text, false); } } catch (Exception Ex) { MessageBox.Show(Ex.Message); } }
private void COPY_Click(object sender, EventArgs e) { if (ClipBoard.GetText() != PASSWORD.Text) { ClipBoard.CopyText(PASSWORD.Text, true); if (PASSWORD.Text == ClipBoard.GetText()) { Status.Message = PASSWORD.Text + " copied!"; } else { Status.Message = PASSWORD.Text + " could not be copied!"; } } }
private void CYB_Click(object sender, EventArgs e) { if (PWDTB.Text != Clipboard.GetText()) { ClipBoard.CopyText(PWDTB.Text, true); if (PWDTB.Text == Clipboard.GetText()) { Status.Message = "Generated password copied successfully!"; PWDTB.Focus(); } else { Status.Message = "Failed to copy the generated password!"; } } }
private static void CopyGameObjectPath() { UnityEngine.Object obj = Selection.activeObject; if (obj == null) { Debug.LogError("No GameObject"); return; } string result = AssetDatabase.GetAssetPath(obj); // 如果不是资源则在场景中查找 if (string.IsNullOrEmpty(result)) { result = AnimationUtility.CalculateTransformPath(Selection.activeTransform, null); } ClipBoard.Copy(result); Debug.Log(string.Format("<color=green>[Path]</color>:{0} - {1}", obj.name, result)); }
protected void BindClipBoard() { ClipBoard cb = (ClipBoard)ViewState["clipboard"]; if (cb == null) { lblClipboard.Text = "<b>Clipboard:</b> Empty"; } else { string cstr = cb.Files.ToString(); if (cstr.Length > 50) { cstr = cstr.Substring(0, 50) + " ..."; } lblClipboard.Text = String.Format("<b>Clipboard:</b> <b>Cut:</b> {0} <b>Files:</b> {1}", cb.Move, cstr); } }
private void MainForm_Load(object sender, EventArgs e) { stringStuff = new StringStuff(); csvParse = new CsvParse(); clipBoard = new ClipBoard(); txtPath.Text = Properties.Settings.Default.appDataPath; var roamingDirectory = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); rootDir = Path.Combine(roamingDirectory, @"LoonieTunes"); Directory.CreateDirectory(rootDir); if (!string.IsNullOrEmpty(txtPath.Text)) { btnProg.Visible = true; } if (!string.IsNullOrWhiteSpace(txtPath.Text)) { btnCopy.Visible = true; PopulateDropDown(); cmbRealmName.Text = Properties.Settings.Default.realmSelection; } }
protected void magix_ide_paste_control(object sender, ActiveEventArgs e) { Node ip = Ip(e.Params); if (ShouldInspect(ip)) { AppendInspectFromResource( ip["inspect"], "Magix.ide", "Magix.ide.hyperlisp.inspect.hl", "[magix.ide.paste-control-dox].value"); AppendCodeFromResource( ip, "Magix.ide", "Magix.ide.hyperlisp.inspect.hl", "[magix.ide.paste-control-sample]"); return; } if (!SurfaceEnabled) { throw new ArgumentException("wysiwyg surface is not enabled"); } if (ClipBoard == null) { throw new ArgumentException("no control in clipboard"); } Node controlToAddNode = ClipBoard.Clone(); GetNextAvailableControlId(controlToAddNode); AddControlToSurface( ip, controlToAddNode); }
protected void magix_ide_get_clipboard_control(object sender, ActiveEventArgs e) { Node ip = Ip(e.Params); if (ShouldInspect(ip)) { AppendInspectFromResource( ip["inspect"], "Magix.ide", "Magix.ide.hyperlisp.inspect.hl", "[magix.ide.get-clipboard-control-dox].value"); AppendCodeFromResource( ip, "Magix.ide", "Magix.ide.hyperlisp.inspect.hl", "[magix.ide.get-clipboard-control-sample]"); return; } if (ClipBoard != null) { ip["control"].Add(ClipBoard.Clone()); } }
protected void CopyCutHandler(bool cut) { ArrayList selfiles = new ArrayList(); CheckBox chkSelect; FileSystem fs = new FileSystem(Globals.CurrentIdentity); foreach (DataGridItem item in dgFiles.Items) { if (null != (chkSelect = (CheckBox)item.FindControl("chkSelect"))) { if (chkSelect.Checked) selfiles.Add((int)dgFiles.DataKeys[item.ItemIndex]); } } if (selfiles.Count > 0) ViewState["clipboard"] = new ClipBoard(selfiles, cut); else DisplayMessage("No files selected. To cut/copy files check the boxes on their left"); BindClipBoard(); }
private void Selector(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Middle) { if (ModifierKeys.HasFlag(Keys.Control)) { PlayEndOfSelectedAndStartOfNextSong(); return; } else { PlayThisSong(); return; } } if (QuickSweeper.SweeperModeOn && !(ModifierKeys.HasFlag(Keys.Control) || ModifierKeys.HasFlag(Keys.Alt) || ModifierKeys.HasFlag(Keys.Shift))) { if (QuickSweeper.Current?.box.Items.Count > 0) { if (QuickSweeper.Current.box.SelectedItems.Count > 0) { currentListImplemented.Insert(this.Song.Index, new FirePlaySong(QuickSweeper.Current.DictListOfFiles[QuickSweeper.Current.box.SelectedItem.ToString()])); return; } } } if (ModifierKeys.HasFlag(Keys.Control) && ModifierKeys.HasFlag(Keys.Shift)) { //PlayEndOfSelectedAndStartOfNextSong(); return; } if (ModifierKeys.HasFlag(Keys.Control)) { if (!ClipBoard.IsEmpty) { currentListImplemented.Insert(Index, ClipBoard.Retrive()); } else { this.checkbox_selected.Checked = !this.checkbox_selected.Checked; } } else if (ModifierKeys.HasFlag(Keys.Shift) || ModifierKeys.HasFlag(Keys.ShiftKey)) { if (lastSelected != null && this != lastSelected) { if (this.Song.Index < lastSelected.Song.Index) { currentListImplemented.Songs.ForEach((x) => { x.SongView.checkbox_selected.Checked = false; if (x.Index >= this.Song.Index && x.Index <= lastSelected.Song.Index) { x.SongView.checkbox_selected.Checked = true; } }); } if (this.Song.Index > lastSelected.Song.Index) { currentListImplemented.Songs.ForEach((x) => { x.SongView.checkbox_selected.Checked = false; if (x.Index <= this.Song.Index && x.Index >= lastSelected.Song.Index) { x.SongView.checkbox_selected.Checked = true; } }); } } } else { if (!ClipBoard.IsEmpty) { currentListImplemented.Insert(Index, ClipBoard.RetriveOne()); } else { currentListImplemented.Songs.ForEach((x) => x.SongView.Unselect()); this.Select(); } } if (!(ModifierKeys.HasFlag(Keys.Shift) || ModifierKeys.HasFlag(Keys.ShiftKey))) { lastSelected = this; } }
void OnGUI() { if (hasinfo == false) { string place = "hello"; bool check = PlayerPrefs.HasKey(place); if (!check) { GUI.skin = DogeSignIn; Rect square = new Rect(PercentWidth(10), PercentHeight(10), PercentWidth(80), PercentHeight(80)); GUI.Label(square, "Fill Form to Board Rocket."); GUI.skin = null; } } else { //WE still need to draw add bottom. //ON GUI is broken up like start. The Main Focus is TOPside. RIGHT SIDE. LEFT SIDE. GUI.skin = FrontMenuSkin; //TOP SIDE //Generating box with image. --Box001. GUI.Box(FrontLogoBox, TitleImage); //LEFT SIdE //We are instantiating Sign in button. //First we find out if the user is signed in. if (Social.localUser.authenticated == false) { //If here the user has 'NOT' signed in. //Use SignInSkin2 GUI.skin = NotSignedInSkin; GUI.contentColor = HexToColor("BA9F32"); //Change Color to the Same as Dogecoin if (GUI.Button(boxSignIn, "Login (Offline)")) { Social.localUser.Authenticate((bool success) => { // handle success or failure if (success) { Debug.Log("We authenticated Us."); //Social.localUser.ToString } else { Debug.Log("We didn't get athenticated"); } }); } GUI.contentColor = HexToColor("FFFFFF"); GUI.skin = null; } else { //If here the user has signed in. GUI.skin = SignedInSkin; GUI.contentColor = HexToColor("F7931A"); //Change Text to the same Color as Bitcoins if (GUI.Button(boxSignIn, "Logged In")) { EMessage = "You are Already Signed In"; EMbool = true; } GUI.contentColor = HexToColor("FFFFFF"); GUI.skin = null; } GUI.skin = FrontMenuSkin; //Generating box with image. --Box002. if (GUI.Button(boxTimeRun, "Arcade")) { Application.LoadLevel(2); } /* * //Generating box for Catch Them All. --Box003. * if(GUI.Button( boxCatchThemAll, "Catch Them All")) * { * Debug.Log("Catch Them All, Has Been Pressed"); * Application.LoadLevel(3); * * } * */ //RIGHT SIDE //button for leaderboards. if (GUI.Button(boxLeaderBoards, "Leaderboards")) { Social.ShowLeaderboardUI(); } //Generating box for more info. --Box004. if (GUI.Button(boxMoreInfo, "More Info")) { Application.LoadLevel(4); } GUI.Label(boxSpew, "Help fund Me!"); //GUI.contentColor = HexToColor("BA9F32"); //Color of a Dogecoin. //GUI.Label (boxDogeAddress, "Dogecoin : 1DsWtLUDhPdC6kVVrBPWDAA5Cd8nkFVoNf"); //GUI.contentColor = HexToColor("F7931A"); //Color of a bitcoin //GUI.Label (boxBitAddress, "Bitcoin : DQeNLk464g6szk3zpjDjFpwR2wHxtFsJsr"); #if UNITY_ANDROID //Here we create our Copy address to Clipboard. for Dogecoin and Bitcoin. if (GUI.Button(boxDogeAddress, CopyDogecoin)) { ClipBoard.ExportString("1DsWtLUDhPdC6kVVrBPWDAA5Cd8nkFVoNf"); EMessage = "Copied Dogecoin Address"; EMbool = true; EMTleft = ErrorMessageTimer; } //Here we create our Copy address to Clipboard. for Dogecoin and Bitcoin. if (GUI.Button(boxBitAddress, CopyBitcoin)) { ClipBoard.ExportString("DQeNLk464g6szk3zpjDjFpwR2wHxtFsJsr"); EMessage = "Copied Bitcoin Address"; EMbool = true; EMTleft = ErrorMessageTimer; } #endif //Bottom //Checking to see if we should be showing an Error message. if (EMbool) { GUI.skin = errorGuiSkin; //If here we need to show the error message. GUI.Label(rectUserError, EMessage); //If there is no time left. (Set EMbool to false.) So message will not show no more. and Default EMTLEFT. //Otherwise, We need to take away time that has passed. if (EMTleft <= 0) { EMbool = false; EMTleft = ErrorMessageTimer; } else { EMTleft -= Time.deltaTime; } GUI.skin = null; } GUI.skin = null; //setting the gui skin for the label; BITCOIN FACTS GUI.skin = FactSkin; //get the btc quote we will show to the user. string quote = GameObject.Find("Scripts").GetComponent <BitcoinAdvantages>().BTCfact; //generate the new label. with points GUI.Label(FactBox, "Did You Know? " + quote); GUI.skin = null; //Draw MockUp ad //GameObject.Find("AdMobPlugin").GetComponent<AdMobPluginMockup>().DrawAd(); // GameObject.Find("AdMobPlugin").GetComponent<AdMobPlugin>().Load(); } // end ELSE }
private void Copy_B_Click(object sender, EventArgs e) { ClipBoard.CopyText(Password.Text, true); Password.Focus(); }
static void PasteAll(RoadEditorCollapsiblePanel groupPanel) { Log.Debug("PasteAll called"); NetLaneProps.Prop[] props = ClipBoard.GetDataArray() as NetLaneProps.Prop[]; AddProps(groupPanel, props); }