mikebai.com

  • Home
  • dev
  • DotNET
  • M365
  • 搞笑
  • 杂七杂八
  • FocusDict
DotNET
DotNET

Using WinMerge as a Visual Source Safe 5.0 diff tool

I faced lot of trouble when i do difference between  two versions in VSS, it is not specifying what exactly the change is. So i thought of exploring how to use one of the best open source diff tool to make this. In this post i am going to explain how can we integrate WinMerge’s diff tool with VSS 5.0. Pre-Requisites: 1. VSS 5.0 installed 2. Winmerge 2.12.4 installed. Steps: 1. Open VSS by entering valid User name, password and connect to a Visual Source Safe database. 2. Go to Tools>Options. 3. In options dialog go to the “Custom Editors” tab by clicking on the spin button (< >) 4. Click on the Operations combo box. 5. Select “File Difference” 6. In File Extension edit box: enter file extension to use (Ex: .*) for all file types. 7. In Command Line edit box: enter the installation location of the WinMergeU.exe. on My machine. Example: C:\Program Files\WinMerge\WinMergeU.exe /e /x /wl /wr %1 %2 8

2018-03-17 0comments 119hotness 0likes mikebai Read all
DotNET

How to Clear INetCache in C#

How to Clear INetCache in C# Step 01. Create Variable private const int INTERNET_OPTION_END_BROWSER_SESSION = 42; [DllImport("wininet.dll", SetLastError = true)] private static extern bool InternetSetOption(IntPtr hInternet, int dwOption, IntPtr lpBuffer, int lpdwBufferLength); Step 02. Create Method private static void ClearIEFolder() {     try     {         string args1 = "";         args1 = ("InetCpl.cpl,ClearMyTracksByProcess 8");         System.Diagnostics.Process process = null;         System.Diagnostics.ProcessStartInfo processStartInfo;         processStartInfo = new System.Diagnostics.ProcessStartInfo();         processStartInfo.FileName = Environment.GetFolderPath(Environment.SpecialFolder.System) + "\\Rundll32.exe";         if ((System.Environment.OSVersion.Version.Major >= 6))         {             //  Windows Vista or higher             processStartInfo.Verb = "runas";         }         processStartInfo.Arguments = args1;         processStartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;         processStartInfo.UseShellExecute = false;         processStartInfo.RedirectStandardOutput = true;         processStartInfo.RedirectStandardError = true;         try         {             process = System.Diagnostics.Process.Start(processStartInfo);         }         catch { }         finally         {             if (!(process == null))             {                 process.Dispose();             }         }     }     catch { }     try      …

2018-03-17 0comments 134hotness 0likes mikebai Read all
DotNET

C# 字符串 前面 美元符号

内插字符串以美元符号$开头,后面跟一个""包含的字符串,字符串中大括号包含的内容会由编译器计算成一个字符串,如果是对象的话就会调用对象的ToString方法,然后拼接产生结果。 如果要在内插字符串中包含大括号,就需要连续两个大括号{{ }}这样的。单大括号里的内容不仅仅可以是一个值,表达式也可以 string name = "microsoft"; int age = 23; Console.WriteLine("{0} is {1} years old.", name, age); //使用内插字符串 Console.WriteLine($"{name.ToUpper()} is {age * 2} years old.");

2018-02-19 0comments 125hotness 0likes mikebai Read all
DotNET

sharepoint popup窗体间传值和子画面表格数据排序

-----父窗体------ <%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register TagPrefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Register TagPrefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register TagPrefix="MySharePoint" Namespace="SharePointProject2" Assembly="$SharePoint.Project.AssemblyFullName$" %> <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CaseAdd.ascx.cs" Inherits="SharePointProject2.CONTROLTEMPLATES.CaseAdd" %> <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script> <style type="text/css">     td {         min-height: 40px;     } </style> <script>     function openDialogAndReceiveData(tUrl, tTitle)     {         var options = {             url: tUrl,             title: tTitle,             dialogReturnValueCallback: onPopUpCloseCallBackWithData         };         SP.UI.ModalDialog.showModalDialog(options);     }     function onPopUpCloseCallBackWithData(result, returnValue)     {         if (result == SP.UI.DialogResult.OK)         {             SP.UI.Status.removeAllStatus(true);             var sId = SP.UI.Status.addStatus("Data successfully populated to text boxes from Pop-up");             SP.UI.Status.setStatusPriColor(sId, 'green');             document.getElementById('<%= txtid.ClientID %>').value = returnValue[0];             document.getElementById('<%= txtLawyerName.ClientID %>').value = returnValue[1];             document.getElementById('<%= txtCountry.ClientID %>').value = returnValue[2];             document.getElementById('<%= txtCity.ClientID %>').value = returnValue[3];         }         else if (result == SP.UI.DialogResult.cancel)         {            …

2017-12-25 0comments 108hotness 0likes mikebai Read all
DotNET

SPS中弹窗传值

<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register TagPrefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Register TagPrefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register TagPrefix="MySharePoint" Namespace="SharePointProject2" Assembly="$SharePoint.Project.AssemblyFullName$" %> <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CaseAdd.ascx.cs" Inherits="SharePointProject2.CONTROLTEMPLATES.CaseAdd" %> <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script> <style type="text/css">     td {         min-height: 40px;     } </style> <script>     function openDialogAndReceiveData(tUrl, tTitle)     {         var options = {             url: tUrl,             title: tTitle,             dialogReturnValueCallback: onPopUpCloseCallBackWithData         };         SP.UI.ModalDialog.showModalDialog(options);     }     function onPopUpCloseCallBackWithData(result, returnValue)     {         if (result == SP.UI.DialogResult.OK)         {             SP.UI.Status.removeAllStatus(true);             var sId = SP.UI.Status.addStatus("Data successfully populated to text boxes from Pop-up");             SP.UI.Status.setStatusPriColor(sId, 'green');             document.getElementById('<%= txtLawyerName1.ClientID %>').value = returnValue[0];             document.getElementById('<%= txtCountry1.ClientID %>').value = returnValue[1];             document.getElementById('<%= txtCity1.ClientID %>').value = returnValue[2];         } else if (result == SP.UI.DialogResult.cancel)         {             SP.UI.Status.removeAllStatus(true);             var sId = SP.UI.Status.addStatus("You have cancelled the Operation !!!");…

2017-12-23 0comments 98hotness 0likes mikebai Read all
DotNET

SPS log 路径

%CommonProgramFiles%\Microsoft Shared\Web Server Extensions\16\LOGS\

2017-12-19 0comments 98hotness 0likes mikebai Read all
DotNET

jquery popup数据传递

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="WebApplication1.WebForm2" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />     <title></title>     <link rel="stylesheet" href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css" />     <script src="http://code.jquery.com/jquery-3.2.1.min.js"></script>     <script src="http://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>     <script>         function popupWin()         {             var url = "/WebForm1.aspx";             var newWin = window.showModelDialog(url, window, '');             newWin.open();         }         function popUp()         {             var url = "/WebForm1.aspx";             objSubWin = window.open(url, "Popup", "toolbar=no,scrollbars=no,location=no,statusbar=no,menubar=no,resizable=0,width=600,height=500");             objSubWin.focus();         }         function popUp2()         {             var url = "/WebForm1.aspx";             opendialog(url);         }         //$("#somediv").click(function ()         //{         //});         //https://api.jqueryui.com/dialog/#option-buttons         function opendialog(page)         {             var $dialog = $('#somediv')                 .html('<iframe style="border: 0px; " src="' + page + '" width="100%" height="100%"></iframe>')                 .dialog({                     title: "Page",                     autoOpen: false,        …

2017-12-15 0comments 123hotness 0likes mikebai Read all
DotNET

SharePoint custom SaveButton

    public class MySaveButton : SaveButton     {         protected override void OnInit(EventArgs e)         {             base.OnInit(e);             this.Text = "XXX添加XXX";         }         protected override bool SaveItem()         {             //custom code             ItemContext.ListItem.Fields["SaveStatus"].ValidateParseAndSetValue(SPContext.Current.ListItem, "save");             //ASP._controltemplates_15_productadd_ascx             TextBox txtGetValueFromSavaButtonClass =(TextBox)this.TemplateControl.FindControl("txtGetValueFromSavaButtonClass");             bool result = base.SaveItem();             return result;         }         //C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\TEMPLATE\CONTROLTEMPLATES         protected override string DefaultTemplateName         {             get             {                 return "MySaveButton";                 //検索条件  "RenderingTemplate ID=\"SaveButton"                 //C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\TEMPLATE\CONTROLTEMPLATES\DefaultTemplates.ascx(1874, 13)                 //[UTF - 8]: < SharePoint:RenderingTemplate ID = "SaveButton" runat = "server" >             }         }         //protected override bool OnBubbleEvent(object source, EventArgs e)         //{         //    ItemContext.ListItem.Fields["Product Description"].ValidationMessage = "asd";         //    return base.OnBubbleEvent(source, e);         //}    …

2017-12-14 0comments 100hotness 0likes mikebai Read all
DotNET

asp:Repeater 例子

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %> <%@ Import Namespace="System.Data" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />     <title></title>     <style>         .table {             border: 1px double #A3D1AD;             margin-top: 5px;             margin-bottom: 5px;             background: #FFFFFF;             font-size: 12px;         }         /*选中时式样*/         .TR_BG {             background-color: #E4FCCB;             font-size: 12px;         }         /*非选中时式样*/         .TR_BG_list {             background-color: #F4FFE8;             font-size: 12px;         }         .sys_topBg {             color: #47974B;             font-size: 14px;             text-decoration: none;             font-weight: bold;         }     </style>     <script>         function SelectAll(f, mode)         {             if (mode == true)             {                 for (i = 0; i < f.length; i++)                 {                    …

2017-12-13 0comments 110hotness 0likes mikebai Read all
DotNET

Use SharePoint people pickers on Project Server or Online PDPs

https://gallery.technet.microsoft.com/projectserver/Use-SharePoint-people-cc8289de Project Server PDPs (Project Detail Pages) have the facility to host Project level enterprise custom fields for users to edit.   Out-of-the-box Project Server supports Cost, Date, Duration, Flag, Number and Text - but not fields of type Person. With the supplied Javascript, you can transform any 'Single Line Of Text' field into a SharePoint people picker.

2017-12-09 0comments 97hotness 0likes mikebai Read all
12345…16

Recent Posts

  • c# winform适配高dpi
  • com.microsoft.sqlserver.jdbc.SQLServerException “trustServerCertificate”属性设置为“false”,但驱动程序无法使用安全套接字层 (SSL) 加密与 SQL Server建立安全连接
  • java -cp 用法介绍
  • HTML 容器元素
  • MVC的cshtml的介绍

Recent Comments

No comments to show.

COPYRIGHT © 2025 mikebai.com. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang