This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// добавялем кнопку очищающют текстовое поле | |
<input type="text" id="MyTextInput" name="filter_name" size="30" value="test"> | |
<input type="button" value="Clear" onclick="document.getElementById('MyTextInput').value = null;"> | |
//Вызываем PHP код из скрипта JS | |
//Переход на страницук PHP | |
<button onclick="window.location.href='two.php'">Click me</button> | |
//or | |
<button onclick='hello()'>Click me</button> | |
<script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.IO; | |
private void Log (string eventName) { | |
using (StreamWriter logger = new StreamWriter(path, true)) { | |
logger.WriteLine(DateTime.Now.ToLongTimeString() + "-" + eventName); | |
} | |
} | |
//или | |
private void Log (string eventName) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//из Фамилия Имя Отчетво -> Фамилия И.О. | |
=ЛЕВСИМВ(B2;НАЙТИ(" ";B2;1)+1)&"."&ПСТР(B2;НАЙТИ(" ";B2;НАЙТИ(" ";B2;1)+1)+1;1)&"." | |
//Если Имя Отчество перенесено на другую строку | |
=ЛЕВСИМВ((ПОДСТАВИТЬ(ПОДСТАВИТЬ(B125;СИМВОЛ(13);"");СИМВОЛ(10);""));НАЙТИ(" ";B125;1)+1)&"."&ПСТР((ПОДСТАВИТЬ(ПОДСТАВИТЬ(B125;СИМВОЛ(13);".");СИМВОЛ(10);""));НАЙТИ(" ";(ПОДСТАВИТЬ(ПОДСТАВИТЬ(B125;СИМВОЛ(13);"");СИМВОЛ(10);""));НАЙТИ(" ";B125;1)+1)+1;1)&"." | |
//из Фамилия Имя Отчетво -> Имя Отчество | |
=ПСТР(B2;ПОИСК(" ";B2)+1;ДЛСТР(B2)) | |
//из Фамилия Имя Отчетво -> И.О. Фамилия | |
=ПСТР(B2;НАЙТИ(СИМВОЛ(32);B2;1)+1;1)&"."&ПСТР(B2;ПОИСК(СИМВОЛ(32);B2;НАЙТИ(СИМВОЛ(32);B2;1)+1)+1;1)&". "&ЛЕВСИМВ(B2;НАЙТИ(СИМВОЛ(32);B2;1)-1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Поместитить иконку в кнопку | |
Content="{materialDesign:PackIcon Kind=DeleteSweep, Size=30} //XAML | |
bt_Hide.Content = new MaterialDesignThemes.Wpf.PackIcon { Kind = MaterialDesignThemes.Wpf.PackIconKind.ArrowDownCircle }; //C# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private bool ZoomIsOn => Process.GetProcessesByName("zoom").Any(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Сначала добавляем сылку на Microsoft.Office.Interop.Excel; | |
using System; | |
using System.Collections.Generic; | |
using System.Windows; | |
using Excel = Microsoft.Office.Interop.Excel; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Содежимое App.xaml | |
<Application.Resources> | |
<ResourceDictionary> | |
<ResourceDictionary.MergedDictionaries> | |
<ResourceDictionary Source="/WpfApp;component/styles/myButton.xaml"/> | |
</ResourceDictionary.MergedDictionaries> | |
</ResourceDictionary> | |
</Application.Resources> | |
//Навание сборки WpfApp, файл со стилем кнопки лежит в папке styles и называетмя myButton.xaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Создаем класс | |
using System.Windows.Input; | |
namespace WPFWeekReport { | |
public class Commands { | |
static Commands() { | |
Save = new RoutedCommand("Save", typeof(MainWindow)); | |
} | |
public static RoutedCommand Save { get; set; } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DockPanel> | |
<Menu DockPanel.Dock="Top" MinHeight="25"> | |
<MenuItem Header="File" /> | |
<MenuItem Header="Edit"> | |
<MenuItem Header="Copy" Command="Copy" CommandTarget="{Binding ElementName=tb1}" /> | |
<MenuItem Header="Paste" Command="Paste" CommandTarget="{Binding ElementName=tb1}" /> | |
</MenuItem> | |
</Menu> | |
<TextBox x:Name="tb1" DockPanel.Dock="Bottom" /> | |
</DockPanel> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.IO; | |
public static bool CheckBd() { | |
string curDir = Directory.GetCurrentDirectory(); | |
FileInfo fileInf = new FileInfo(curDir + "/store.mdb"); | |
if (fileInf.Exists) return true; | |
return false; | |
} |